...or a loop :
my $str = 'barp'; $str = ">".$str until (length$str >=10); ## in case it is already more + than 10... print $str . "\n";
Obviously the loop could check for anything, the length of the pad, the number of a particular character, the time...
Updated code and added last bit
In reply to Re^2: Clever Padding
by BioLion
in thread Clever Padding
by iweindesmedt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |