Macphisto has asked for the wisdom of the Perl Monks concerning the following question:

I've been using PERL for awhile now, but I haven't done any CGI work, and I just picked up a copy of O'Reillys programming CGI with perl the other day to hopefully help in a project of mine.

As I've mentioned before, I've been working ( I should be done by now, but I'm too strapped for time ) on a Perl script that implements Chinese Flash Cards. I am using the .gif files from Zhongwen and I wanted to write a script to automate the retrival of the .gif's from the aforementioned site. The site uses a search engine that you enter the english text, and it will return a list of possibilities. I don't want code returned from anyone who answers as I would like this to be a learning experience. I would however like to know, if it possible and if it will be a large project, or a simple one.

Thank you very much,
Macphisto

Everyone has their demons....

Replies are listed 'Best First'.
Re: Perl CGI Possibilities...
by btrott (Parson) on Aug 14, 2000 at 03:30 UTC
    What do you mean by "retrieval"? Are you going to be downloading the GIF files as a one-time thing, or is this something you're going to be regularly, ie. to update them locally or something?

    Anyway, have you looked at using LWP to download the images? It does all of the HTTP work for you. If you're going to be getting search results pages back, you'll need to parse the HTML to extract the images, I presume. If so, take a look at HTML::Parser.

(crazyinsomniac:Kudos!) Re: Perl CGI Possibilities...
by crazyinsomniac (Prior) on Aug 14, 2000 at 04:51 UTC
    Kudos Macphisto,<BT> Rarely do you see someone wanting real a learning experience anymore. People just want a quick fix.

    Anyway your project should be a relatively simple one.

    As for the learning part, the monks above correctly(as always) pointed out a few modules you should look into, but I also suggest looking at the source for those modules, or diving in your book to see and learn the hard way of doing things.

    "Your brain is hungry InformIT" - is a great website with a whole crapload of free tech. books on many subjects including CGI, it's worth checking out.

    "cRaZy is co01, but sometimes cRaZy is cRaZy".
                                                          - crazyinsomniac

RE: Perl CGI Possibilities...
by Macphisto (Hermit) on Aug 14, 2000 at 04:04 UTC
    I apologize for not specifying: I had planned to issue "updates" which would go to the site, get specific characters, and store them correctly in the appropriate directories. These updates would be done just once. Anytime an update is out, then it would be aquired( probably a simple text file ) then once the person is connected to the net, they could run the program and it would retrieve the information they need... Thank you Macphisto

    Everyone has their demons....
Re: Perl CGI Possibilities...
by ColtsFoot (Chaplain) on Aug 14, 2000 at 10:22 UTC