sub unindent { my $str = shift; (my $s) = $str =~ m/^(\s+)/; $str =~ s/^$s//gm; return $str; }
This will look at the first line and extract that much leading whitespace from every line so does what you want without the .
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Unindenting here-docs (Re: My day with Damian Conway)
by tachyon
in thread My day with Damian Conway
by petdance
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |