in reply to Reg Exp Suggestion Needed

I don't think there's a way to make sure the variable is always 4 bytes other than to format it before you use it.
$var = sprintf('%04d', $num);
Works well to zero-pad the number for printing, but if you do any arithmetic on it, you'll need to repad it, because perl will take off the leading zeroes.

kelan


Yak it up with Fullscreen ChatBox