>So, 1. from within perl.script, how can one tell if the input stream is >coming from STDIN or a file that was opened by <>? Use select >2. If input stream is not coming from STDIN, but a file, how can one >tell which file is the current file (assuming multiple files were >specified on the command line)? My solution is the hard way. Open the files yourself and use the respective filenames as their filehandles. That is: open($foo, "< $foo") or die "Could not open $foo: $!\n"; __________________ William Ampeh (x3939) Federal Reserve Board -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
- What is the source of my input, file or STDIN? pgregory
- Re: What is the source of my input, file or STDIN? drieux
- Re: What is the source of my input, file or STDIN? Jenda Krynicky
- Re: What is the source of my input, file or STDIN? John W. Krahn
- Re: What is the source of my input, file or STDIN? William.Ampeh
- Re: What is the source of my input, file or STDI... R. Joseph Newton
- RE: What is the source of my input, file or STDIN? pgregory
- RE: What is the source of my input, file or STDI... david
- Re: What is the source of my input, file or STDI... Steve Grazzini
- Re: What is the source of my input, file or ... drieux
- Re: What is the source of my input, file... Steve Grazzini
- -t and STDIN was Re: What is the so... drieux
- Re: -t and STDIN was Re: What i... Steve Grazzini
- Re: What is the source of my input, file or STDI... R. Joseph Newton