in reply to Re^10: collect data from web pages and insert into mysql
in thread collect data from web pages and insert into mysql
does what is says on the tin. :-)die qq{no sids found\n} unless @sids;
Perhaps replace that line with something like
That way it will print a message and simply move on if none are found.if (not @sids){ print qq{no sids found in $cpid\n}; next; }
On a side note you could declare
before the main loop as it is the same everytime.my $url = q{http://csr.wwiionline.com......etc.};
Also,
is reading a line from the file and then throwing it away. It is starting on the second line of the file. Remove the first declaration and change the while tomy $pidlist = <$settings>; # Get list of pids and process all while ( $pidlist = <$settings> ) {
I reckon it's shaping up nicely. :-)while (my $pidlist = <$settings>){ #...
|
|---|