in reply to Unexpected difference in whitespace parsing in subroutine calls.
If we deparse this to see how perl will it makes a certain kind of sense
So, cases 1, 3 and 6 all behave the same (i.e call f) and cases 2, 4 and 5 behave the same (i.e sort on 0, which, as a single element list, is already sorted, so f isn't called). And that's the end of that chapter.## deparse output as deparsed by -MO=Deparse,-p print(sort(f(0))); # case 1 print((sort f 0)); # case 2 print(sort(&f(0))); # case 3 print((sort f 0)); # case 4 print((sort f 0)); # case 5 print(sort(&f(0))); # case 6 sub f { 1; } - syntax OK
HTH
_________
broquaint
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Unexpected difference in whitespace parsing in subroutine calls.
by Lexicon (Chaplain) on Jul 10, 2005 at 11:20 UTC |
In Section
Seekers of Perl Wisdom