in reply to Regular Expression from Hell

What happens if the number has just 3 digits?
my $test = 123; while (length($test) < 5) { $test = '0' . $test; }
or
my $test = 123; $test = ('0' x (5-length($test))) . $test;

Search, Ask, Know