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;
In reply to Re^3: Why do we need $a and $b to be special?
by adrianh
in thread Why do we need $a and $b to be special?
by rinceWind
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |