Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: I need a perl script to make every instance of a repeated word unique

by tilly (Archbishop)
on Jan 28, 2011 at 23:57 UTC ( [id://884953]=note: print w/replies, xml ) Need Help??


in reply to I need a perl script to make every instance of a repeated word unique

The substitution that you will need is s/\bundefined\b/"undefined" . ++$count/eg.

perlop has instructions for how to use such substitutions (look for "s/PATTERN/REPLACEMENT"), and perlrun documents the -p and -e flags which are likely to prove very useful for you.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-03-19 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found