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


in reply to Limited Number of User Input

You discovered "chomp".

The next step is to fix the "for loop" termination condition.

"0 < $numfiles-1" will not work. Try comparing $currentfile with $numfiles.

             "I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
        -- Dr. Cox, Scrubs