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."