in reply to Zero-padding integers and the numbers-as-strings Red Flag

Why not just
sub paddatevalues { foreach my $value (@_) { $value = sprintf "%02d", $value; } return @_; }
Or if you want to get fancy
sub paddatevalues { return map {sprintf "%02d", $_} @_; }

Replies are listed 'Best First'.
Re: Re: Zero-padding integers and the numbers-as-strings Red Flag
by Ionizor (Pilgrim) on Jan 14, 2003 at 05:07 UTC

    D'oh. That easy, huh? *wince* Forgot about sprintf.

    Thanks.