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

> thx
> matthias
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
The Case for File Swapping - http://shlom.in/file-swap

Only wimps complain about bad code. Real men clean it up.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to