Need better specs. From you description I can't tell if there's no difference between the two (say, just use the '-p' flag on the command line or the <> operator in the code), or if maybe there is some difference where I might need to test @ARGV to see if there are any arguments before processing STDIN.