I am writing a module that ideally will use sort-style comparison functions that take the two sides using the "special" $a and $b variables. But a simple test
perl -le ' $a=27; package foo; print $a'
indicates that $a is not as special as, say, $_{a} would be.
So here's the question:
how do I load data into $a and $b so that a sort comparator defined in a distant module can see them?
I can fall back to having the comparator function take $_[0] and $_[1] if I must.
In reply to just how special are $a and $b these days? by davidnicol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |