Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Turning foreach into map?

by dragonchild (Archbishop)
on Apr 04, 2005 at 20:24 UTC ( [id://444786]=note: print w/replies, xml ) Need Help??


in reply to Turning foreach into map?

Did it work? If it didn't, what did you see that you think you shouldn't have? In other words, it looks good, but YMMV.

FYI, I would have written that as so:

sub links { my $url = shift; return map { "$url/$_\n" } @_; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-20 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found