Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^11: collect data from web pages and insert into mysql

by wfsp (Abbot)
on Aug 03, 2010 at 15:36 UTC ( [id://852684]=note: print w/replies, xml ) Need Help??


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

In the main loop
die qq{no sids found\n} unless @sids;
does what is says on the tin. :-)

Perhaps replace that line with something like

if (not @sids){ print qq{no sids found in $cpid\n}; next; }
That way it will print a message and simply move on if none are found.

On a side note you could declare

my $url = q{http://csr.wwiionline.com......etc.};
before the main loop as it is the same everytime.

Also,

my $pidlist = <$settings>; # Get list of pids and process all while ( $pidlist = <$settings> ) {
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 to
while (my $pidlist = <$settings>){ #...
I reckon it's shaping up nicely. :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://852684]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2024-04-23 10:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found