in reply to Unindenting here-docs (Re: My day with Damian Conway)
in thread My day with Damian Conway
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
|
---|
Replies are listed 'Best First'. | |
---|---|
(tye)Re: Unindenting here-docs (Re: My day with Damian Conway)
by tye (Sage) on Jan 31, 2002 at 16:41 UTC |
In Section
Meditations