in reply to Sub can't get $_ value?

why don't you just get rid of length and use this

$num = sprintf("%06d", $num); # if only numbers $num = sprintf("%06s", $num); # if num and letters

"Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce

Replies are listed 'Best First'.
Re: Re: Sub can't get $_ value?
by DaWolf (Curate) on Jan 11, 2004 at 23:24 UTC
    Great tip.

    Thanks!

    my ($author_nickname, $author_email) = ("DaWolf","erabbott\@terra.com.br") if ($author_name eq "Er Galvão Abbott");