Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Download and Save an image?

by Anonymous Monk
on Oct 17, 2001 at 00:56 UTC ( [id://119255]=perlquestion: print w/replies, xml ) Need Help??

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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Download and Save an image?
by damian1301 (Curate) on Oct 17, 2001 at 01:47 UTC
    There are modules for this which could be easily found. Always be sure to search CPAN first--its all been done by someone before :)

    Image::Grab

    _______________________________________________________
    s&&q+\+blah+&oe&&s<hlab>}map{s}&&q+}}+;;s;\+;;g;y;ahlb;veaD;&&print;
Re: Download and Save an image?
by grinder (Bishop) on Oct 17, 2001 at 01:00 UTC

    Install Bundle::LWP (if it isn't already installed). Then run the following:

    GET http://www.example.com/icons/foo.png >myfoo.png

    ...and you're done. Next question please.

    update: this response is a bit a "give a man a fish" instead of "teach a man to fish". So, in the interest of completeness, should you find that GET is a little too rudimentary, I suggest you read 'perldoc lwpcook', which gives you all sorts of recipes for downloading web objects.

    --
    g r i n d e r

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://119255]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-20 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found