On Wed, 13 Aug 2003 19:34:51 +0200, allan juul wrote:
>i have a problem removing blank lines in one regexp. my string will be
>slurped so it will contain newlines as examplified below:
>
>my $str = qq(test0;
>test1;
>//test2;
>test3;);
>
>$str =~ s,^.*//.+;$,,igm;
>
>print $str;
>
>__END__
>
>
>
At 11:45 pm +0100 16/8/03, John Delacour wrote:
At 7:34 pm +0200 13/8/03, allan juul wrote:
i want t achieve:
--
test0;
test1;
test3;
I'd do it like this:
[...]
foreach (@lines) {
s~^//~~ ;
print qq~$_$newlinechar~ ;
}
Sorry -- I misread your last bit. I'd do it like thi
At 7:34 pm +0200 13/8/03, allan juul wrote:
hello
i have a problem removing blank lines in one regexp. my string will
be slurped so it will contain newlines as examplified below:
my $str = qq(test0;
test1;
//test2;
test3;);
$str =~ s,^.*//.+;$,,igm;
print $str;
__END__
i want t achieve:
-
hello
i have a problem removing blank lines in one regexp. my string will be
slurped so it will contain newlines as examplified below:
my $str = qq(test0;
test1;
//test2;
test3;);
$str =~ s,^.*//.+;$,,igm;
print $str;
__END__
this is the result:
-
test0;
test1;
test3;