Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Script to update a value in text file

by Boldra (Deacon)
on Jun 15, 2010 at 12:03 UTC ( #844846=note: print w/ replies, xml ) Need Help??


in reply to Script to update a value in text file

in-place-edit is appropriate (YourMother's reply), but just because I'm still amazed at how cool IO::All is:

perl -MIO::All -E 's/(\d+)/$1+1/e for @{io("/tmp/amvarma.txt")}'


- Boldra


Comment on Re: Script to update a value in text file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2015-03-28 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (625 votes), past polls