Stuart Clark wrote: > > Hi Group, Hello,
> Thanks for the help on the last question. > Here is another i am having troubles with. > Its a regular expression question. > I have left out the rest of the script (which is working fine) > > I am trying to convert a file with numbers like these > > 54.35 > 435.23 > 1.98 > 57 > > to this > > 00005435 > 00043523 > 00000198 > 00000057 > > This is what i am trying to use. > > print (s\.\\,(sprintf"%09.2f",$number)); > > I thought that perl would complete the inside brackets first > Then the s\.\\ would operate on the result. $ perl -e' @x = qw(54.35 435.23 1.98 57); for ( @x ) { s/\.//; printf "%09d\n", $_; } ' 000005435 000043523 000000198 000000057 John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]