Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^5: Image magic creation of thumb fail

by marto (Cardinal)
on Jan 08, 2023 at 12:14 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found