local $_ = $_[0];
# Cut trailing spaces
s/\s+\n$//;
s/\s+$//;
# Expand tabs
s/\t+/' ' x (length($&) * $tabstop - length($`) % $tabstop)/e