in reply to Re^2: Why do we need $a and $b to be special?
in thread Why do we need $a and $b to be special?
I didn't know that. How would the $$ prototype be seen in a CODE ref? Would it still work?
Just apply the prototype to the coderef, for example:
my $sort = sub ($$) { $_[0] cmp $_[1] }; my @sorted = sort $sort @unsorted;
|
|---|