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

Re: grep keys in hash and retrieve values

by Anonymous Monk
on Mar 16, 2012 at 10:07 UTC ( [id://959951]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -le " print scalar grep /./, qw/ a b c /; "
    3
    
  2. or download this
    $ perl -le " print for grep /./, qw/ a b c /; "
    a
    b
    c
    
  3. or download this
    $ perl -le " ( $foo ) = grep /./, qw/ a b c /;  print $foo "
    a
    
    $ perl -le " print( ( grep /./, qw/ a b c /  )[0] ); "
    a
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-26 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found