in reply to Can you change the format pad character?
However, this piece of code can be dropped in to your program rather easily:
sub pad_string { my $string = shift; my $desired_length = shift; my $pad_character = shift || " "; substr($string,0,0) = $pad_character x ($desired_length - length $st +ring); $string; }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Can you change the format pad character?
by Not_a_Number (Prior) on May 26, 2003 at 21:28 UTC | |
by merlyn (Sage) on May 27, 2003 at 20:23 UTC | |
by Not_a_Number (Prior) on Jun 01, 2003 at 17:44 UTC |