Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: grep { $var } @arr

by Athanasius (Archbishop)
on Jul 17, 2014 at 14:56 UTC ( [id://1094069]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #! perl
    use strict;
    ...
    
    @res = grep { $pat->($_) } @arr;
    print "Variable:\t@res\n";
    
  2. or download this
     0:52 >perl 939_SoPW.pl
    Literal:        1 2
    Variable:       1 2
    
     0:52 >
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-24 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found