Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re (tilly) 3: playing with map

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


in reply to Re (tilly) 3: playing with map
in thread playing with map

return grep s/^FOR_PRINT://, <FILE>;
But even that can be trivially written as:
return map /^FOR_PRINT(.*)/s, <FILE>;
And thus not lose 5 style points for altering $_, which in my all-too-often experience spits out an "attempt to modify read-only value" when I least expect it.

-- 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://63283]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-18 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found