Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: playing with map

by merlyn (Sage)
on Mar 09, 2001 at 23:18 UTC ( [id://63316]=note: print w/replies, xml ) Need Help??


in reply to Re: playing with map
in thread playing with map

No, that presumes a 1-1 mapping. Some are, some aren't. It's more like this:
@new = (); for (@old) { push @new, act_on($_); }
Consider this to see the difference:
@old = (10..20); sub act_on { return 1..$_; }
The first element becomes 10 elements of output, the second becomes 11, and so on.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-28 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found