http://qs321.pair.com?node_id=555840


in reply to Re: A Procrustean Statement
in thread A Procrustean Statement

Pad and truncate:
$_ = sprintf '%-*.*s', $len, $len, $_;