Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: again problem with regexpr

by ambs (Pilgrim)
on Mar 27, 2005 at 19:42 UTC ( [id://442688]=note: print w/replies, xml ) Need Help??


in reply to again problem with regexpr

You want to load a file from your hard dick? :-|

What you want seems to be inplace editing:

#!/usr/bin/perl -i.bak while(<>) { s/trojan is like viruse/hello/g; print }
The -i switch makes your script to process the files you pass as arguments to the script inplace. The extra .bak makes it create a backup.

Alberto Simões

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found