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!
--Pileofrogs
Update:Great responses everyone! ++ all round!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to make EOF?
by samtregar (Abbot) on Mar 04, 2009 at 06:35 UTC | |
by roboticus (Chancellor) on Mar 04, 2009 at 21:21 UTC | |
Re: How to make EOF?
by ELISHEVA (Prior) on Mar 04, 2009 at 07:07 UTC | |
Re: How to make EOF?
by CountZero (Bishop) on Mar 04, 2009 at 06:23 UTC | |
Re: How to make EOF?
by zentara (Archbishop) on Mar 04, 2009 at 11:34 UTC | |
Re: How to make EOF?
by cdarke (Prior) on Mar 04, 2009 at 09:31 UTC |
Back to
Seekers of Perl Wisdom