sub pad { my $char = pop; my $max = pop; $char = " " unless defined $char; $_[0] .= $char x ($max - length $_[0]); }