in reply to Regular Expression from Hell
my $test = 123; while (length($test) < 5) { $test = '0' . $test; } [download]
my $test = 123; $test = ('0' x (5-length($test))) . $test; [download]