Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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
string?

Thanks

Comment on input record separator
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...

    --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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://881379]
Approved by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (17)
As of 2015-07-31 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (281 votes), past polls