changing $/ for recognising empty line

2012-10-29 Thread Hermann Norpois
Dear list, I would like $/ to recognise empty lines (one empty line). I tried $/ = ^\s+$; But this does not work. Error message: Unrecognised escape \s passed through at ex2.ol line 5. I have an input file structured like this: # kljhkjhkljhlkjh lk1243, hkjhkjh #ztztzti jj562356, jkjk7kjk My

Re: changing $/ for recognising empty line

2012-10-29 Thread Paul Johnson
On Mon, Oct 29, 2012 at 12:48:33PM +0100, Hermann Norpois wrote: But still: What is wrong with $/=^\s+$ ? From perldoc perlvar: Remember: the value of $/ is a string, not a regex. awk has to be better for something. :-) -- Paul Johnson - p...@pjcj.net http://www.pjcj.net -- To

Re: changing $/ for recognising empty line

2012-10-29 Thread Jim Gibson
On Oct 29, 2012, at 4:48 AM, Hermann Norpois wrote: Dear list, I would like $/ to recognise empty lines (one empty line). I tried $/ = ^\s+$; But this does not work. Error message: Unrecognised escape \s passed through at ex2.ol line 5. I have an input file structured like this: