in reply to collect data from web pages and insert into mysql
I'm not sure that I understand the "pid" and "sid" stuff, but the answer is yes, this kind of task (retrieve a web page, parse for data, store the retrieved data into a DB) can be done with Perl. For the web pages, you can use a module like LWP to grab the contents. From there, you can either use regular expressions to manually parse the data or you might find an HTML parser module that may help out. As for the DB connection, you'll probably want to use DBD::mysql, which will allow you to query your MySQL DB as well as do inserts and updates.
Since you're new to Perl, you'll definitely want to keep http://search.cpan.org handy. That's where you'll be able to search for other Perl modules.
Welcome to the wonderful world of Perl!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: collect data from web pages and insert into mysql
by SteinerKD (Acolyte) on Jul 30, 2010 at 15:57 UTC | |
by dasgar (Priest) on Jul 30, 2010 at 16:41 UTC |