in reply to Seemingly odd behavior of sequence
If you're curious how Perl parses an expression--perhaps for debugging purposes or just for the pure joy of it on a rainy afternoon--you can use the module B::Deparse at the command line as follows:
perl -MO=Deparse,-p -e 'print 0..9 x 2, "\n";'
Output:
print((0 .. (9 x 2)), "\n"); -e syntax OK
Note that the output echoes oiskuu's spot-on assessment of your expression's evaluation.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Seemingly odd behavior of sequence
by jar00n (Novice) on Dec 05, 2013 at 09:44 UTC | |
by Kenosis (Priest) on Dec 06, 2013 at 16:49 UTC |
In Section
Seekers of Perl Wisdom