Welcome to the Monastery | |
PerlMonks |
Shortest way to replace a stringby nikfr (Initiate) |
on Sep 11, 2013 at 22:58 UTC ( [id://1053590]=perlquestion: print w/replies, xml ) | Need Help?? |
nikfr has asked for the wisdom of the Perl Monks concerning the following question:
Hi, i have a file containing strings like this: 30.00.02.53 some text here 54.00.70.13 some text here 30.00.02.36 some text here 54.00.70.13 some text here 70.00.00.23 some text here 30.00.11.05 some text here 30.00.00.00 some text here 30.00.00.13 some text here 54.00.70.13 some text here and want to replace all what begins with 30.00 by 30.00.00.00 e.g. replace 30.00.02.53 by 30.00.00.00 What is the simplest (shortest) way to do this? Thank you for your time!
Back to
Seekers of Perl Wisdom
|
|