Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Concise foreach expression

by LanX (Saint)
on Aug 29, 2014 at 13:01 UTC ( [id://1098992]=note: print w/replies, xml ) Need Help??


in reply to Re: Concise foreach expression
in thread Concise foreach expression

> map { /test$/ and say } @names;

variation:

/test$/ and say for @names;

( of course always with use feature 'say';)

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

Replies are listed 'Best First'.
Re^3: Concise foreach expression
by AppleFritter (Vicar) on Aug 29, 2014 at 16:27 UTC
    TMTOWTDI at its best!

Log In?
Username:
Password:

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

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

    No recent polls found