http://qs321.pair.com?node_id=1107800


in reply to Trying to fetch image via URL Perl/Tk

Hi, welcome to the monastery.

Tk::Photo doesn't handle downloading images from a URL. However combined with a pair of additional modules, you can do it yourself:

use Tk; use Tk::Photo; use Tk::JPEG; use LWP::Simple; use MIME::Base64 qw(encode_base64); my $mw=new MainWindow; my $data = encode_base64 get('http://tinyurl.com/oyzuyjt'); my $shot=$mw->Photo(-data=>$data,-format=>'jpeg'); $mw->Label(-image=>$shot)->pack; MainLoop;