in reply to Re: What does $/ = "\/\/\n"; mean?
in thread What does $/ = "\/\/\n"; mean?

Excellent demonstration (++) but it is misleading in one minor way.... Your example data is actually separated by "\n//\n", which is a bit different from the original question about the separator "//\n". Your example makes it sound like the data below consists of two records, when it is actually four.
__DATA__ first row// second row // another first// another second //

-Blake

Replies are listed 'Best First'.
Re: Re: Re: What does $/ = "\/\/\n"; mean?
by gmax (Abbot) on Jan 16, 2002 at 16:13 UTC
    Thanks for your comment. I agree on the VISUAL misleading of the data. However, even though the data looks like it's divided by "\n//\n", the code is actually separating by "//\n" only, leaving one extra "\n" in the data after chomping.
    I presented the data that way because I has in mind fortunes files, where records are separated by a "\n%%\n".
    _ _ _ _ (_|| | |(_|>< _|