Just use the BLOCK form, and everything will work: sort {by_seq([qw(five nine one seven three)])} keys %h
In reply to Re: sort in arbitrary order with subroutine, syntax error
by moritz
in thread sort in arbitrary order with subroutine, syntax error
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |