in reply to Surprising whitespace behavior
If you try perl -MO=Deparse you will see that the perl compiler interprets the print statement as you surmised:
Why there is a difference between the interpretation of $ followed by whitespace and @ followed by whitespace probably lies in the fact that @-interpolation is a quite new invention (5.6 AFAICR).my(@a) = ('a', 'b', 'c', 'def'); my $s = 'foo'; print "s=$s, a=\@ a\n"; - syntax OK
-MO=Deparse is very handy for finding out why a coinstruct does what it does (and for deobfuscation).
In Section
Seekers of Perl Wisdom