Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: find and replace in perl

by torres09 (Acolyte)
on Jun 24, 2013 at 06:15 UTC ( #1040373=note: print w/ replies, xml ) Need Help??


in reply to Re: find and replace in perl
in thread find and replace in perl

hey

can't we do the find and replace operation via perl on the entire text file , without taking it into an array

like say find and replace on a file handler . sorry I am new to perl , so I don't have a lot of command on it


Comment on Re^2: find and replace in perl
Re^3: find and replace in perl
by davido (Archbishop) on Jun 24, 2013 at 06:18 UTC

    perl -pi.bak -e 's/pattern/replace/g' filename.txt

    Dave

Re^3: find and replace in perl
by Anonymous Monk on Jun 24, 2013 at 07:35 UTC

    sorry I am new to perl

    :) I read perlintro every day, and I'm very old to perl :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2015-07-06 19:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (81 votes), past polls