![]() |
|
Think about Loose Coupling | |
PerlMonks |
Re^7: Binary to decimal conversionby Fletch (Chancellor) |
on Dec 11, 2007 at 14:02 UTC ( #656408=note: print w/replies, xml ) | Need Help?? |
Because print takes a LIST and hence provides a list context to reverse which triggers the list context behavior from the latter (and a 1 element list reversed is indistinguishable from the original 1 element list for obvious reasons). Stick a scalar in there after the print, and/or store the reverse into a scalar temporary variable, and you'll see the behavior you're expecting.
The cake is a lie.
In Section
Seekers of Perl Wisdom
|
|