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
In reply to Catching GD warning by Marcello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |