in reply to Re: Generating standard length strings
in thread Generating standard length strings

Note that your sub will cut off the input string if its length is larger than the padding width:
sub rpad { pack "A$_[1]", $_[0] }; my $string = 'averylongstringthatislongerthan10charsforsure!'; print "]", rpad($string, 10), "[\n"; __END__ ]averylongs[
I am not sure if that is what the OP intended.