Am 2012-09-27 13:16, schrieb Shlomi Fish:
Hi Matthias,
On Thu, 27 Sep 2012 12:50:56 +0200
Matthias Leopold<matth...@aic.at> wrote:
hi,
i'm using the example from man perlop for here docs with indentation
i'm using vim syntax with "set list" and "set number lines"
1 ^I(my $quote =<<'^IFINIS') =~ s/^\s+//gm;$
2 ^IThe Road goes ever on and on,$
3 $
4 ^I$
5 ^Idown from the door where it began.$
6 ^IFINIS$
why does s/^\s+//gm kill the "empty" lines 3 and 4, whereas
s/^\t+//gm does not?
That's because \s also matches \n (and \r).
Regards,
Shlomi Fish
ok, thx. simple question, simple answer...
matthias
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/