... although after reading all the responses, I agree that sprintf is the best way to go.sub pad{ my ($string, $length) = @_; return (length($string) < $length ? pack("A$length", $string) : $st +ring); }
In reply to Re: Generating standard length strings
by crashtest
in thread Generating standard length strings
by kage-yojimbo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |