use strict; use warnings; use GD; my $image; # $image = GD::Image->new($data) # If something goes wrong, this call will return undef. # so one could do : ($image = GD::Image->new("test.jpg")) or warn "Error: $!"; # or if (! ($image = GD::Image->new("test.jpg")) ) { print "my error handling\n"; } # eval trapping would work too...
In reply to Re: Catching GD warning
by ady
in thread Catching GD warning
by Marcello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |