in reply to Batch process LWP search

First off, you're using something called: &ParseForm which sounds like it comes from "cgi-lib.pl", which has been deprecated for security and design reasons for something like 5 years now.

Secondly, you use globals wrongly in several places, for example, sub ParseList should take @list as an argument, and you should declare all the variables you use inside there as lexicals local to the subroutine.

Thirdly I notice you don't "chomp" or otherwise remove the line endings from the lines you read from the filehandle. From this description you've given it sounds like this is the cause of your main problem.

When you do <IN> you get a line terminated by the line ending, which you then try to feed to the website, which probably can't find the number plus the line ending. This would also account for the last line in a multiple line file working fine, as you don't add a line ending to the last line.