In perl, if I have a pgm:
while (<>) {
print "this is the line: $_";
}
normally I'd invoke the pgm like:
echo "repeat this line" | ./pgm
But if I accidentally invoke it like:
./pgm
How would I prevent the while loop from running (i.e. pseudocode):
while (<>) if (exists <STDIN>) {
print "$_";
}
Thanks
Jay
Jay Strauss
[EMAIL PROTECTED]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
- Re: [vox-tech] How to check for data coming in STDIN Jay Strauss
- Re: [vox-tech] How to check for data coming in STDIN Micah Cowan
- Re: [vox-tech] How to check for data coming in STDIN Jay Strauss
- Re: [vox-tech] How to check for data coming in ST... jdnewmil
- Re: [vox-tech] How to check for data coming i... Jay Strauss
- Re: [vox-tech] How to check for data coming in ST... Micah Cowan
- Re: [vox-tech] How to check for data coming i... Cam Ellison
- Re: [vox-tech] How to check for data com... Micah Cowan
