Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Changing Perl's sort Default

by krusty (Hermit)
on Oct 23, 2002 at 08:34 UTC ( #207312=note: print w/ replies, xml ) Need Help??


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"


Comment on Re: Re: Changing Perl's sort Default
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://207312]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (15)
As of 2015-07-06 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (72 votes), past polls