Something tells me there is a better way. Any suggestions?
do {(my $t,@a) = sort @a};
Update: Use tinita's suggestion below. It's the idiom I had in mind anyway; I guess I just didn't recall it correctly.
In reply to Re: Type of arg 1 to shift must be array (not sort)
by sauoq
in thread Type of arg 1 to shift must be array (not sort)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |