Hello all. I am working on my script, and I would like to be able to use
STDIN as a filehandle input unless a filename is specified. I have used the
getopt for the filename, let's say $opt_f.

I thought I would do something like this:

( $opt_f ) ? open( INFILE, "$opt_f" ) or die( "Can't open...) : INFILE =
STDIN;

while(<INFILE>){ ... }

I know that's really stupid, but that's all that I could think of. What's
the correct way to do this?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to