|Do you know where your variables are?|
Re: First time using Argsby JavaFan (Canon)
|on May 03, 2012 at 17:13 UTC||Need Help??|
You want to explicitly read from STDIN, not the magical ARGV, which only reads from STDIN if no argument are given (or to be precise, if @ARGV is empty). Replace your <> with <STDIN>.
And as a general advice: avoid write tools that ask the user questions: arguments are more flexible, as it makes piping and scripting easier. Imagine that each time you would run perl from the command line, it starts with: