Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: playing with map

by snowcrash (Friar)
on Mar 09, 2001 at 13:45 UTC ( [id://63213]=note: print w/replies, xml ) Need Help??


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

> you couldn't do it with a grep call, because grep returns
> some subset of the original list. it doesn't make any
> modifications.

wrong. you could use grep, and it is destructive to the input list. something like this works:
my @n = grep s/$_/$count+=$_;$_=$count/e, <DATA>;
i know it doesn't make any sense to use grep here, but it can be done.

cheers snowcrash //////

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://63213]
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: (10)
As of 2024-04-18 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found