Help for this page

Select Code to Download


  1. or download this
    use strict;
    my ($len, $str) = (5, "someword");
    $str = sprintf "%-${len}.${len}s", $str;
    print ">>$str<<\n";