$s = 'fred bill john';; $s .= ' 'x ( 37 - length( $s ) + $s =~ tr[ ][]s ); print "'$s'";; 'fred bill john '