in reply to Re: end of line anchor in regex
in thread end of line anchor in regex
perl -wMstrict -e "my $text = qq(start\nrats\n); $text = join($1, grep(/[^start]/, split(/(\n)/, $text))); print qq(o/p: \n); print qq({$text})" Use of uninitialized value in join or string at -e line 1. o/p: { }
wouldn't it at least be better to say grep($_ ne 'start', ... ) (although it still leaves the "Use of uninitialized value ..." problem, which i don't quite understand)?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: end of line anchor in regex
by Anonymous Monk on Dec 10, 2007 at 04:09 UTC |