The specific error message you're getting is because you don't actually declare $line. You could do what with foreach my $line ( @lines ) {....
At some point you'll probably want to set up a parallel user agent. It's likely that your biggest bottleneck will be in fetching the documents, otherwise.
If you ask a dozen individuals how to implement a parallel user agent you'll probably get a dozen different answers. Some will include explicit use of fork or threads, while others might recommend a module that works well for them. I've used both LWP::Parallel::UserAgent, and Mojolicious's built-in Mojo::UserAgent. I think a lot more ongoing work and maintenance has gone into the latter, and since I use Mojolicious for other purposes anyway (and as it can be installed in under a minute), I lean toward the Mojo::UserAgent approach nowadays. Mojo::UserAgent combined with Mojo::IOLoop (an event loop) and Mojo::DOM (HTML/XHTML DOM parser with CSS selector support) is a powerful ally.
Dave
In reply to Re: Foreach Array and Html table extract
by davido
in thread Foreach Array and Html table extract
by doctordoctor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |