Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Use of uninitialized value in string comparison (cmp)

by Discipulus (Abbot)
on Sep 16, 2015 at 10:49 UTC ( #1142185=note: print w/replies, xml ) Need Help??


in reply to Use of uninitialized value in string comparison (cmp)

Hello,

sort needs to operate on $a and $b not on $_
#sorry win quote perl -wle "@r=({k=>'r'},{k=>'s'},{k=>'t'});print $_->{k} for sort { $a +->{k} cmp $b->{k} } @r;" r s t

L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Use of uninitialized value in string comparison (cmp)
by Random_Walk (Prior) on Sep 16, 2015 at 10:57 UTC

    Aaarrgghhh, I knew I had been staring at it too long. I knew that, but it slipped out my memcache somewhere :(. Thanks for the reminder.

    Cheers,
    R.

    Pereant, qui ante nos nostra dixerunt!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2022-01-22 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?