Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: Golf: reverse sort /etc/passwd by UID

by thundergnat (Deacon)
on Feb 05, 2013 at 20:33 UTC ( #1017278=note: print w/replies, xml ) Need Help??


in reply to Re^3: Golf: reverse sort /etc/passwd by UID
in thread Golf: reverse sort /etc/passwd by UID

No, unfortunately that doesn't work either. A regex match in scalar context returns 1 or 0. It needs to be called in list context to return the value.
>perl -E"print 'foo'=~/(o+)/;" oo
>perl -E"print scalar 'foo'=~/(o+)/;" 1

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017278]
help
Chatterbox?
[james28909]: how come it is so easy for me to not care what others think while others will mute themselves because they are scare they will be called ignorant or stupid
[james28909]: do you relize how shrodinger felt when he was describing the quantum world? what about neils bohr?
[holli]: it's probably the autist in you. I am like that too, no fucks given about what others think about me

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2017-12-15 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (433 votes). Check out past polls.

    Notices?