in reply to Difficulty with using LWP to display JPEG
That's what I'd expect if I printed a jpeg to the console--a bunch of binary data. Instead of printing it, save it to a file:
open my $FH, '>', 'image.jpg'; binmode $FH; print $FH $resp->content; close $FH;
Then use an image viewer to look at the resulting file.
Update: I just replaced the contents of your if statement with the above lines of code, and tried it. It worked just fine.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Difficulty with using LWP to display JPEG
by Aquilae (Novice) on Apr 11, 2014 at 18:26 UTC | |
by roboticus (Chancellor) on Apr 11, 2014 at 18:33 UTC | |
by Aquilae (Novice) on Apr 11, 2014 at 19:03 UTC | |
by roboticus (Chancellor) on Apr 11, 2014 at 19:14 UTC | |
by Aquilae (Novice) on Apr 11, 2014 at 19:28 UTC | |
| |
by ww (Archbishop) on Apr 12, 2014 at 17:57 UTC | |
by trwww (Priest) on Apr 12, 2014 at 16:57 UTC |