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).
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: Use B::Deparse to see why
by merlyn (Sage) on Sep 23, 2004 at 14:13 UTC | |
by tye (Sage) on Sep 23, 2004 at 16:21 UTC | |
by merlyn (Sage) on Sep 23, 2004 at 16:23 UTC | |
Re: Use B::Deparse to see why
by dragonchild (Archbishop) on Sep 23, 2004 at 14:11 UTC |
In Section
Seekers of Perl Wisdom