in reply to Re: providing a callback routine to sort
in thread providing a callback routine to sort
I really think you did not provide enough information to help you
See Re: providing a callback routine to sort ( $::a $::b )
The only reason $a and $b are undefined is because they're not $main::a and $main::b -- sort deals with $main::a and $main::b or $::a for sort -- this is the OPs problem and the solution, use the right variable (package affects unqualified variables)
sort talks about this exactly
An alternate solution (using prototypes) is also talked about in sort and in chromatics free book Modern Perl a loose description of how experienced and effective Perl 5 programmers work....You can learn this too.
looks probably wrong to me. Left side looks like a function, right side not.
Well, they're both perfectly identical method calls
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: providing a callback routine to sort
by Anonymous Monk on Jan 22, 2014 at 14:24 UTC |