in reply to Grabbing Specific Image

People work too hard at copying URLs to disk. Witness:
use LWP::Simple qw(mirror); mirror("http://www.dimages.example.com/image_sample.gif", "local_file. +gif");
What's nice is that this also respects being re-run, caching the local version and properly passing "if-modified-since" to minimize the work if the file hasn't changed.

Replies are listed 'Best First'.
Re^2: Grabbing Specific Image
by Anonymous Monk on May 01, 2007 at 17:08 UTC
    That works, but how could I send the image file to another directory.
        Use "some/other/dir/local_file.gif" if you want.
        I'm quite certain that the local directory (some/other/dir) already has to exist for this to work.

        But for some reason, it doesn't give me an error, either.