Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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
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 cooling their heels in the Monastery: (6)
As of 2014-08-30 17:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls