Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: again problem with regexpr

by ambs (Pilgrim)
on Mar 27, 2005 at 19:42 UTC ( #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? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2021-10-17 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (71 votes). Check out past polls.

    Notices?