Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: chop() and chomp()

by TGI (Parson)
on May 25, 2007 at 22:18 UTC ( #617621=note: print w/replies, xml ) Need Help??


in reply to Re: chop() and chomp()
in thread chop() and chomp()

Be careful with variables named $a and $b, they are special when used in conjunction with sort.

For example:

sort { $b cmp $a } @foo;
gives you an reverse alphabetical (ASCIIbetical really) sort on @foo.


TGI says moo

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://617621]
help
Chatterbox?
[choroba]: Haven't you crashed into a boar recently?
[1nickt]: TCLion how is that going?
[LanX]: could someone lend me a car?
[LanX]: choroba yes that's why a have no cars left
[Eily]: maybe you could crash the python compiler instead
[LanX]: Larry the greatest

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (16)
As of 2017-03-23 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (291 votes). Check out past polls.