Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: A matter of style: how to perform a simple action based on a simple condition?

by james2vegas (Chaplain)
on Sep 26, 2010 at 23:38 UTC ( #862135=note: print w/replies, xml ) Need Help??


in reply to Re: A matter of style: how to perform a simple action based on a simple condition?
in thread A matter of style: how to perform a simple action based on a simple condition?

foreach (@ray1) { push @ray2,$_ if ($_<0) }
doesn't seem to be the best example to use since it is probably better expressed with a map like
push @ray2, grep { $_ < 0 } @ray1

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://862135]
help
Chatterbox?
[Corion]: From time to time, you actually uncover things that always were wrong ;)
[Happy-the-monk]: Discipulus: please, what are the labels for CTRL+SHIFT+TAB on an Eatalian keyboards?
[Discipulus]: yes but ireally do not understand anonymous's reply about cpan r command: found no bug with that number and points to mjd.. doh?!
[Discipulus]: Happy-the-monk CTRL is the same. SHIFT is a big fat arrow pointing up. TAB are two opposite arrows on each other pointing left/rigth

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-11-21 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (297 votes). Check out past polls.

    Notices?