Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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

Comment on Re^2: chop() and chomp()
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2015-11-28 08:43 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (740 votes), past polls