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.

In reply to Re: Batch process LWP search by BUU
in thread Batch process LWP search by langsor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.