Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^5: Image magic creation of thumb fail

by marto (Cardinal)
on Jan 08, 2023 at 12:14 UTC ( #11149430=note: print w/replies, xml ) Need Help??

in reply to Re^4: Image magic creation of thumb fail
in thread Image magic creation of thumb fail

"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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11149430]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2023-03-27 11:27 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (65 votes). Check out past polls.