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

Re^2: need help in editing multiple word in a file

by vkp (Novice)
on Nov 19, 2012 at 17:40 UTC ( #1004590=note: print w/ replies, xml ) Need Help??


in reply to Re: need help in editing multiple word in a file
in thread need help in editing multiple word in a file

consider this example: lion is brave animal. cat is brave animal. dog is brave animal. in this i want to change brave by frightened only for cat. so i need to match cat and replace brave with frightened. So match file is like: cat frightened . Thanks.


Comment on Re^2: need help in editing multiple word in a file
Replies are listed 'Best First'.
Re^3: need help in editing multiple word in a file
by Not_a_Number (Parson) on Nov 19, 2012 at 19:10 UTC

    Ok, so how do you propose deciding which word in the string:

    cat is brave animal

    should be replaced by 'frightened'?

    In other words, is this also acceptable:

    cat frightened brave animal

    ?

    Update: de-gobbledegooked, I hope...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (13)
As of 2015-07-29 12:20 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 (263 votes), past polls