Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

input record separator

by utterlyconfused (Novice)
on Jan 09, 2011 at 21:38 UTC ( [id://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

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-24 22:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found