in reply to Resizing an image with perl.
This line may be a problem:
open FH, ">pc2.png" || die "Could not write to file: $!\n";
As the '||' operator has a high predence, perl will try to compare the string ">pc2.png" instead of the return value of the open statement.
You us the 'or' operator instead, or use brackets like open (FH, ">pc2.png") || die.
But the rest of your code looks fine, using strict and warnings and such :-)
|
|---|