my $graph_image = get($http_request_string); $graph_image at this point is a string, with a PNG-looking header. my $loader = Gtk2::Gdk::PixbufLoader->new; $loader->write($png_data); $loader->close; my $pixbuf = $loader->get_pixbuf; #### #!/usr/bin/perl use strict; use warnings; use Gtk2; my @formats = Gtk2::Gdk::Pixbuf->get_formats(); my @exts; foreach my $format ( @formats ) { foreach my $key ( keys( %$format ) ) { next unless $key eq 'extensions'; foreach my $elem ( @{ $format->{ $key } } ) { push @exts, $elem; } } } print "@exts\n"; #### And finally, [the original message from [aristotle]:

OT: I like to partition things like into smaller scopes: my $pixbuf = do { my $loader = Gtk2::Gdk::PixbufLoader->new(); $loader->write( $image_data ); $loader->close(); $loader->get_pixbuf(); }; So the next guy who looks at it doesn't have to wonder if $loader is used anywhere later, and can see that the entire point of this mumbo jumbo is to load something into $pixbuf. Regards, #Aristotle