http://www.perlmonks.org?node_id=881379

utterlyconfused has asked for the wisdom of the Perl Monks concerning the following question:

Hi Perlmonks,

I'm new to perl and I have an exam coming up. Trying to
figure out the meaning of certain special variables, in this
case $/. I just want to confirm if I understand it right.
Does it convert a multiline string into a single
string?

Thanks

Replies are listed 'Best First'.
Re: input record separator
by Corion (Patriarch) on Jan 09, 2011 at 21:42 UTC

    No. See perlvar. It influences what Perl considers a "line" when reading a file using the diamond operator ( <$fh> ). It does not magically transform data already read into memory into different things.

Re: input record separator
by hsmyers (Canon) on Jan 09, 2011 at 21:54 UTC
    Google Perl cheat-sheet, pick one(or a dozen), print it out and keep it handy. At some point you won't need it, save the PDF file and discard the paper...

    --hsm

    "Never try to teach a pig to sing...it wastes your time and it annoys the pig."
Re: input record separator
by planetscape (Chancellor) on Jan 10, 2011 at 01:03 UTC
Re: input record separator
by kyle (Abbot) on Jan 10, 2011 at 17:28 UTC