my $strlen = "00000000"; my $string = "TEXT"; substr($strlen, -length($string)) = "$string";
You can then print "$strlen\n";
In reply to Re: sprintf question
by AcidHawk
in thread sprintf to zero-pad on the right
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |