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

Re: Map not working as expected.

by shigetsu (Hermit)
on May 04, 2007 at 21:13 UTC ( [id://613659]=note: print w/replies, xml ) Need Help??


in reply to Map not working as expected.

I second chromatic's advice. But for the sake of completeness, here's one using List::MoreUtils::none():
@yum = map { my $yum = $_; (none { /$yum/ } @bad) ? $yum : () } @yum;
It's a bit cryptic, but it does its job.

Log In?
Username:
Password:

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

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

    No recent polls found