D
David Resnick
I've been poking at a script that loses the ability to ready from
<STDIN> after doing a system() call.
I located this
http://perldoc.perl.org/perlfaq8.ht...ter-I-gave-it-EOF-(^D-on-Unix,-^Z-on-MS-DOS)?
which seemed to be the obvious answer to my questions.
But after doing this:
STDIN->clearerr();
or this:
seek STDIN, 0, SEEK_SET
or this
(at program beginning)
my $stdinBegin = tell(STDIN);
Before trying to read STDIN
seek(STDIN, $stdinBegin, 0);
or this
seek(STDIN, 1, 0);
seek(STDIN, 0, 0);
I still find I eternally get undef from <STDIN> after calling this
system command. The system command runs sipp, which does nothing
special as far as I can see. Why would invoking any system command
mess up the parent processes STDIN file handle?
Any suggestions appreciated...
<STDIN> after doing a system() call.
I located this
http://perldoc.perl.org/perlfaq8.ht...ter-I-gave-it-EOF-(^D-on-Unix,-^Z-on-MS-DOS)?
which seemed to be the obvious answer to my questions.
But after doing this:
STDIN->clearerr();
or this:
seek STDIN, 0, SEEK_SET
or this
(at program beginning)
my $stdinBegin = tell(STDIN);
Before trying to read STDIN
seek(STDIN, $stdinBegin, 0);
or this
seek(STDIN, 1, 0);
seek(STDIN, 0, 0);
I still find I eternally get undef from <STDIN> after calling this
system command. The system command runs sipp, which does nothing
special as far as I can see. Why would invoking any system command
mess up the parent processes STDIN file handle?
Any suggestions appreciated...