P is for Practical | |
PerlMonks |
How to make EOF?by pileofrogs (Priest) |
on Mar 04, 2009 at 06:07 UTC ( [id://748000]=perlquestion: print w/replies, xml ) | Need Help?? |
pileofrogs has asked for the wisdom of the Perl Monks concerning the following question: Greetings Monks! Short Version:How do I create an End of File character? Long VersionI'm sending some YAML over a socket and I'm trying to figure out the best way to delimit the end of the YAML stream. I'm thinking of setting $/ to EOF on the reading end and sending an EOF after my YAML stream from the sending end. But, I don't know how to generate an EOF to send. I think EOF has the integer value of -1, but there's probably a more elgant portable way to do it, rather than just hard-coding it. Thanks! Update:Great responses everyone! ++ all round!
Back to
Seekers of Perl Wisdom
|
|