in reply to
Re: Changing Perl's sort Default
in thread Changing Perl's sort Default
# incidentally, why doesn't this trigger a bareword
# warning under strict?
@new = sort alphanumeric @old;
sub alphanumeric { lc $a cmp lc $b }
Because it's expecting either a named subroutine or a block of code. You haven't given it a bareword. You've given it what it expects to be a sub. If it can't find a subroutine named alphanumberic, it'll error out with... "Undefined subroutine in sort at blah.pl line blech"