in reply to substr on $_

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.