in reply to Generating standard length strings
You want string multiplication a la:
I'll leave the golfing to the PGA tour ;)
(code untested)sub standard_fill { my $string = $_[0]; my $length = $_[1]; my $orig_string_length = length($string); $string .= " " x ($length - $orig_string_length); return $string }
I'll leave the golfing to the PGA tour ;)
--------------
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."
|
---|
In Section
Seekers of Perl Wisdom