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

Hi Monks!

All I am trying to do is to go to an specific image url and save a copy of it to a local directory, and my code doesn't work. Is there a easier way of doing that?
Here is some of my code, may be someone could show me where I am doing something wrong.

There is a misprint in the URL; and you're trying to open a direcrory for writing.

The line where you're setting $image_url is also suspicious; what's $url?

Upd And if you actually meant http://www.dimages.com/image_sample.jpg — you need to do something about URL dispatch there, because all http://www.dimages.com/* URLs seem to return the same page. Also, add <body> tags to that page (it seems to be a work in progress, and I boldly assume it's yours; excuse me if it is not so).