--Howdy: --This is what I wound up using:
[example] open (FILE, "+</temp/data.txt") || die "Can't open the sourcefile\n"; while (<FILE>) { s/(\d+)$/0$1/; print; } close FILE [/example] --The interesting thing is that if I have a decimal in there, it puts the zero in front of the decimal, but not the whole number. I'm not sure why, but for now, I'm okay with it. --Thanks all! -X > -----Original Message----- > From: Bob Showalter [mailto:[EMAIL PROTECTED]] > > > > -----Original Message----- > > From: Adam Turoff [mailto:[EMAIL PROTECTED]] > > ... > > s/(\d+)$/sprintf("%02d", $1)/e; > > That doesn't change 23 to 023. Why not just: > > s/(\d+)$/0$1/; Oh crap. Ignore that. Didn't read carefully enough that he didn't want to change 23 to 023. Sorry about that.