Parent Directory | Revision Log
helper to strip leading whitespace
1 | use strict; |
2 | use warnings; |
3 | |
4 | sub strip { |
5 | my $txt = shift; |
6 | $txt =~ s/^\s+$//gm; |
7 | if ( $txt =~ m/(\n\s+)/ ) { |
8 | $txt =~ s/$1/\n/gs; |
9 | } |
10 | $txt =~ s/^\s+//gs; |
11 | $txt =~ s/\s+$//gs; |
12 | warn "$txt\n\n"; |
13 | return $txt; |
14 | } |
15 | |
16 | 1; |
ViewVC Help | |
Powered by ViewVC 1.1.26 |