Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

grep! (My favorite <em>this</em> week, anyway...)

by Russ (Deacon)
on May 11, 2000 at 06:49 UTC ( [id://11102]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @True;
    for my $Element (@Array){
    ...
        push @True, $Element;
      }
    }
    
  2. or download this
    my @True = grep {$_} @Array;
    
  3. or download this
    #(For every fourth element in @List)
    grep {not ++$i % 4} @List;
    
    #(To skip every fifth element)
    grep {++$i % 5} (1..50)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found