F
Franken Sense
In Dread Ink, the Grave Hand of Tad J McClellan Did Inscribe:
It would seem that both
local $/ = "";
and
local $/ = '';
induce paragraph mode.
P. 492 of the camel book speaks to this somewhat with the -O switch, which
specifies the record separator as an octal number. I would have thought
that a goocher of
C:\MinGW\source>perl m5.pl -0 00
would be equivalent
local $/="";
, but the former gives me the following output:
C:\MinGW\source>perl m5.pl -0 00
s[0] = 44:005:017
s[1] = Then
s[2] = the
s[3] = high
s[4] = priest
s[5] = rose
s[6] = up,
s[7] = and
s[8] = all
s[9] = they
s[10] = that
s[11] = were
s[12] = with
s[13] = him,
44:005:017 Then the high priest rose up, and all they that were with him,
s[0] =
s[1] = (which
s[2] = is
s[3] = the
s[4] = sect
s[5] = of
s[6] = the
s[7] = Sadducees,)
s[8] = and
s[9] = were
s[10] = filled
s[11] = with
(which is the sect of the Sadducees,) and were filled with
s[0] =
s[1] = indignation,
indignation,
s[0] = 44:005:018
s[1] = And
s[2] = laid
s[3] = their
s[4] = hands
s[5] = on
s[6] = the
s[7] = apostles,
s[8] = and
s[9] = put
s[10] = them
s[11] = in
s[12] = the
44:005:018 And laid their hands on the apostles, and put them in the
s[0] =
s[1] = common
s[2] = prison.
common prison.
....
--
Frank
And by the way, a few months ago, I trademarked the word 'funny.' So when
Fox calls me 'unfunny,' they're violating my trademark. I am seriously
considering a countersuit.
~~ Al Franken, in response to Fox's copyright infringement lawsuit
No, it removes the record separator.
When the record separator is "one or more blank lines" (ie. para mode),
then chomp() removes "one or more blank lines".
It would seem that both
local $/ = "";
and
local $/ = '';
induce paragraph mode.
P. 492 of the camel book speaks to this somewhat with the -O switch, which
specifies the record separator as an octal number. I would have thought
that a goocher of
C:\MinGW\source>perl m5.pl -0 00
would be equivalent
local $/="";
, but the former gives me the following output:
C:\MinGW\source>perl m5.pl -0 00
s[0] = 44:005:017
s[1] = Then
s[2] = the
s[3] = high
s[4] = priest
s[5] = rose
s[6] = up,
s[7] = and
s[8] = all
s[9] = they
s[10] = that
s[11] = were
s[12] = with
s[13] = him,
44:005:017 Then the high priest rose up, and all they that were with him,
s[0] =
s[1] = (which
s[2] = is
s[3] = the
s[4] = sect
s[5] = of
s[6] = the
s[7] = Sadducees,)
s[8] = and
s[9] = were
s[10] = filled
s[11] = with
(which is the sect of the Sadducees,) and were filled with
s[0] =
s[1] = indignation,
indignation,
s[0] = 44:005:018
s[1] = And
s[2] = laid
s[3] = their
s[4] = hands
s[5] = on
s[6] = the
s[7] = apostles,
s[8] = and
s[9] = put
s[10] = them
s[11] = in
s[12] = the
44:005:018 And laid their hands on the apostles, and put them in the
s[0] =
s[1] = common
s[2] = prison.
common prison.
....
--
Frank
And by the way, a few months ago, I trademarked the word 'funny.' So when
Fox calls me 'unfunny,' they're violating my trademark. I am seriously
considering a countersuit.
~~ Al Franken, in response to Fox's copyright infringement lawsuit