my $fixed = sprintf "%-5.5s", $string; [download]
In reply to Re: fixed length string by edan in thread fixed length string by shilpam