Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

how to substitute a word in a file by perl

by ghosh123 (Monk)
on Aug 31, 2013 at 13:30 UTC ( [id://1051728]=perlquestion: print w/replies, xml ) Need Help??

ghosh123 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on how to substitute a word in a file by perl

Replies are listed 'Best First'.
Re: how to substitute a word in a file by perl
by kcott (Archbishop) on Aug 31, 2013 at 13:41 UTC
Re: how to substitute a word in a file by perl
by hdb (Monsignor) on Aug 31, 2013 at 13:36 UTC

    And what exactly are you having problems with? Read the file line by line, do a global substitution of wood versus food, write into a temp file. Delete input and rename temp file to original name.

Re: how to substitute a word in a file by perl
by ww (Archbishop) on Aug 31, 2013 at 13:35 UTC

    I will provide code upon receipt of (currency only) USD100.00.

    If you really don't want to learn, please stop posting "gimme'" nodes.

    ghosh123 should apologize to all those electrons which were inconvenienced by the creation of the parent post.
Re: how to substitute a word in a file by perl
by Anonymous Monk on Aug 31, 2013 at 13:37 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-18 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found