in reply to Re: When is a function call not a function call
in thread When is a function call not a function call
That doesn't seem to work:
I can eliminate the warnings by choosing a function name that isn't all-lowercase but, as the output demonstrates, the function is still called as a comparator, not a modifier of the input list.% perl -we 'sub fn {print "$a$b\n"} print(sort(fn(0,0,1,2)))' Unquoted string "fn" may clash with future reserved word at -e line 1. 00 10 21 0012
Update: I was using perl 5.6.1. The parentheses trick works with 5.8.
--Dave
Opinions my own; statements of fact may be in error.
Opinions my own; statements of fact may be in error.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: When is a function call not a function call
by duff (Parson) on Mar 30, 2006 at 05:55 UTC |
In Section
Seekers of Perl Wisdom