Marcello has asked for the wisdom of the Perl Monks concerning the following question:
Running this script produces the following warning on the command-line:use strict; use warnings; use GD; my $image = GD::Image->new("test.jpg");
How can I catch this error in Perl? $SIG{__WARN__} is not working here. I would like to catch this error so I can remove the extraneous bytes from the original JPEG file.Corrupt JPEG data: 104 extraneous bytes before marker 0xd9
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Catching GD warning
by eff_i_g (Curate) on May 03, 2006 at 13:50 UTC | |
|
Re: Catching GD warning
by ady (Deacon) on May 03, 2006 at 14:42 UTC | |
by Marcello (Hermit) on May 03, 2006 at 14:59 UTC | |
by wazoox (Prior) on May 03, 2006 at 15:19 UTC |