Sunday, October 5, 2008

Start to learn Perl: Difference between single-quote and double-quotes

$s = 1;
print '$sAND\n';  will result in
$sAND\n
While
print "$s \n"; will result in
1AND

In single-quote, compiler leaves everything what they are, while for double-quotes, special characters will be replaced

Refer to this page.

3 comments:

Anonymous said...

test

Damien said...

Just found your blog! I am trying to learn Perl myself and putting together a blog about it:
http://damienlearnsperl.blogspot.com/
I'll make sure to check your blog often to learn from it!

Junxian Huang said...

Thanks Damien.
I will also go to check your blog often.:)