http://www.perlmonks.org?node_id=150067

bcrowell has asked for the wisdom of the Perl Monks concerning the following question:

I have a script that I'd like to be able to run from the command line like this:

Well, I have no problem retrieving the filename using @ARGV, but Perl also redirects STDIN to the file as well, which I don't want. I want STDIN to be the keyboard. How do I do this? I tried closing and reopening STDIN, but that didn't work. Can I do something to my #! line to defeat this feature?