change last twp digits

From: Asif Iqbal (iqbala_at_qwestip.net)
Date: 01/05/04


Date: Sun, 4 Jan 2004 20:36:59 -0500
To: beginners@perl.org


Hi All

I am trying to relace any 7 digit number to to a new 7 digit number of
which last two digits are 9

lets pick a random 7 digit number as 1347236.

so I want 1347236 --> 1347299 using perl

I can do it with sed

NUMBER=1347236
NUMBER=`echo $NUMBER | sed 's/\([0-9]\{5\}\)[0-9]\{2\}/\199/'`
so now $NUMBER is 1347299

Any help/suggestion would be greatly appreciated

-- 
Asif Iqbal
PGP Key: E62693C5
There's no place like 127.0.0.1