you'll need to build a regexp that fetches all the image files, and then an
lwp thingie that goes and retrieves them

think of something like this:

### $res->content is the return value of a LWP request
my @images = $res->content =~ |<img.+?src=\"?(.+?)\"|sig;

you'll have to add a sanity check to see if the matches you get are full
paths, or relative paths tho.

then say something like:

for (@images) {
    my $url = ... #something with $_ and a sanity check for path

    $req = new HTTP::Request('GET', $url);

    # then do whatever you want with your images... remmeber you pobably
need binmode set if you want to do something with them in perl
}

hth
Jos Boumans


----- Original Message -----
From: "Sparkle Williams" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 2:30 PM
Subject: perl and internet files


> I have written a perl script that retrieves in html style text from
internet
> files.  I need to also retrieve the images that accompany the text. Is
there
> a module I can use to do this? I also was wondering, if I desired to open
> the files retrieved in a browser window, is there any way I can write a
> construct into my script to automatically do that?
>
> _________________________________________________________________
> Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to