Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2016-06-25 23:40 GMT
Find Nodes?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...

    Results (327 votes). Check out past polls.