perl -pi.bak -e 's/\d\d(\d\d)\.(\d{5})/$1$2/' somefile.txt
Cheers,
Ovid
Update: Sheesh. japhy's reply made me feel stupid :)
perl -pi.bak -e 's/\d\d(\d\d)\./$1/' somefile.txt
Vote for paco!
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to Re: substr on $_
by Ovid
in thread substr on $_
by gisrob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |