Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Use of single quotes versus double quotes

by imp (Priest)
on Dec 08, 2006 at 19:44 UTC ( #588680=note: print w/replies, xml ) Need Help??


in reply to Re^2: Use of single quotes versus double quotes
in thread Use of single quotes versus double quotes

There is no runtime difference unless there is a variable being interpolated, in which case only double quotes are appropriate. The perl parser treats them the same otherwise:
perl -MO=Deparse -e ' $a = "foo"; $b = ''foo''; $c = q{foo}' $a = 'foo'; $b = 'foo'; $c = 'foo';
perl -MO=Deparse -e ' $a = "$foo"; $b = q{$foo};' $a = "$foo"; $b = '$foo';

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://588680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2016-09-26 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (478 votes). Check out past polls.