Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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?
[Discipulus]: Hi Corion here is holiday: the best we have Liberation Day
[Discipulus]: waiting sons to finish home assignments and we go out to some park
[Corion]: Discipulus: Oh ;) I'm looking forward to 1st of May - the next holiday here ;)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2017-04-25 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (449 votes). Check out past polls.