in reply to Single Quotes Versus Double Quotes

I can understand that thinking, but I don't think it's correct. It's my understanding that Perl will treat a double-quoted string that contains no variables as a single-quoted string. Example:
perl -MO=Deparse -e 'print "hi"' print 'hi'; -e syntax OK
Also, the word you were thinking of is "interpolate", not "concatenate". :)

---
It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
Re^2: Single Quotes Versus Double Quotes
by ikegami (Patriarch) on Oct 12, 2006 at 16:19 UTC

    Also, the word you were thinking of is "interpolate", not "concatenate". :)

    Aye. Even though interpolation is implemented using concatenation, "strings are concatenated" while "variables are interpolated into strings".

    >perl -MO=Concise -e "$a = qq{$b$c}"; 8 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v ->3 7 <2> sassign vKS/2 ->8 - <1> ex-stringify sK/1 ->6 - <0> ex-pushmark s ->3 5 <2> concat[t4] sK/2 ->6 <---- - <1> ex-rv2sv sK/1 ->4 3 <#> gvsv[*b] s ->4 - <1> ex-rv2sv sK/1 ->5 4 <#> gvsv[*c] s ->5 - <1> ex-rv2sv sKRM*/1 ->7 6 <#> gvsv[*a] s ->7 -e syntax OK