Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

how to substitute a word in a file by perl

by ghosh123 (Monk)
on Aug 31, 2013 at 13:30 UTC ( #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 (Bishop) 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? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2022-05-20 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (73 votes). Check out past polls.

    Notices?