SPUG: Docs on "-l" wrong?

Yitzchak Scott-Thoennes sthoenna at efn.org
Tue Aug 26 12:53:10 CDT 2003


On Tue, Aug 26, 2003 at 12:12:27AM -0700, Fred Morris <m3047 at inwa.net> wrote:
> I confess to never having used -0 or thought about it until now! It seems
> clear it's not an argument to -n. It seems that what they're saying is that
> the input and output separators are decoupled, and that I could for
> instance programmatically change one independently of the other (which
> would better suit my style and needs: I never do any paragraph-oriented
> processing, all lines or slurp... how do I use -0 to set it to undef?)... I
> assume that's true anyway, both from some zen intuition as well as from
> that snippet of documentation. However it's hard to tell without context
> whether the intention of that snippet is to explain the decoupling or to
> explain -0.

Since it is in the -l section, it's to explain the decoupling.  A similar
example with no -l is given in the -0 section.

-0  : sets $/ to "\0"
-0octal : if 0, sets $/ to "" (paragraph mode)
          if 1-0377, sets $/ to that char
          if >0377, sets $/ to undef (only -0777 is documented)

Starting in 5.8.1:
-0xfee : sets $/ to "\x{fee}"
-0xfie : for better backward compatibility, parsed as -0 -xfie, not -0xf -ie



More information about the spug-list mailing list