in reply to command line -00 option
When $/ is set to the null string, like this, it has the effect of using one or more blank lines as the record separator.
However, it still delimits the input records with \n\n. So in effect \n\n+ becomes \n\n. Take for instance the following input file (where $ represents a newline):
These are the days.$ $ $ $ $ These are the days.$ $ $ $ These are the days.$
Filtering it through the following program shows how the records are delimited:
#!/usr/bin/perl -00n s/\n/\$/g; print "<$_>\n"; __END__ Prints: <These are the days.$$> <These are the days.$$> <These are the days.>
Some of this is explained in perlrun and some in perlvar.
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: command line -00 option
by silence (Initiate) on Nov 05, 2002 at 13:53 UTC |