Re: Padding a length of string

"A. Pagaltzis" <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <20040421212034.GB5619@klangraum>
* Uri Guttman <[email protected]> [2004-04-20 08:07]:
> and no one found one of the faster methods:
> 
> my $padded = substr( $in . $c x $pad_len, 0, $pad_len ) ;

I did. Unfortunately, I misread the spec and thought it would be
a problem that it also chops an $in longer than $pad_len down to
$pad_len.

-- 
Regards,
Aristotle
 
"If you can't laugh at yourself, you don't take life seriously enough."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.