sub unindent { my $str = shift; (my $s) = $str =~ m/^(\s+)/; $str =~ s/^$s//gm; return $str; }