![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re^5: Image magic creation of thumb failby marto (Cardinal) |
on Jan 08, 2023 at 12:14 UTC ( #11149430=note: print w/replies, xml ) | Need Help?? |
"Hm don't see what's wrong within open and die," It's nothing to do with the myriad of problems you've created for yourself, however I said "use $! when calling die to tell you why the open failed." So that if/when your code dies while opening, you actually print out the reason why, rather than just printing "error", without telling you what the error was. The documentation for open and the other link I provided explain clearly why three argument open is preferred, and also illustrate the use of or die "Can't write file: $!"; described above.
In Section
Seekers of Perl Wisdom
|
|