Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

input record separator

by utterlyconfused (Novice)
on Jan 09, 2011 at 21:38 UTC ( #881379=perlquestion: print w/replies, xml ) Need Help??
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


Replies are listed 'Best First'.
Re: input record separator
by Corion (Pope) 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...


    "Never try to teach a pig to 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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://881379]
Approved by toolic
[marto]: good morning all

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2017-06-26 09:29 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (575 votes). Check out past polls.