Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: map vs foreach

by jsprat (Curate)
on Jun 20, 2003 at 17:45 UTC ( #267666=note: print w/replies, xml ) Need Help??


in reply to map vs foreach
in thread Using s///e and it just doesn't feel right

Is that more expressive to you than something like this:

trasform $_ foreach @elements;

If so, how?

Replies are listed 'Best First'.
Re: Re: map vs foreach
by dash2 (Hermit) on Jun 20, 2003 at 17:59 UTC
    No, I quite like the single-line foreach also, but it has the disadvantage of being relatively recent... I think 5.005?? When I started using Perl I had to be _very_ cross-platform, and the habit has stuck.
    A massive flamewar beneath your chosen depth has not been shown here

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://267666]
help
Chatterbox?
[LanX]: $; exists, so does the glob
[GotToBTru]: $; is "useful for emulating multi-dimensional arrays in Perl4"
[LanX]: i.e. &; is parsable
[LanX]: it's sometimes useful in P5 too
[LanX]: but I don't understand the question...
[GotToBTru]: okay, I see what it does
[GotToBTru]: you;ve answered it .. the expression is meant to be evaluated as written, it is not a symbol for a special operation
[LanX]: '&;@' is a parsing error

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-01-18 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (164 votes). Check out past polls.