Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: map versus for

by pc88mxer (Vicar)
on Aug 04, 2008 at 15:21 UTC ( [id://702085]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @result = map { f($_) ? g($_) : () } @list;
    
    ...
    for (@list) {
      push(@result, g($_)) if (f($_));
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-03-29 06:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found