Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2016-10-26 22:08 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (350 votes). Check out past polls.