Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)

by Arunbear (Prior)
on Dec 05, 2009 at 21:47 UTC ( [id://811271]=note: print w/replies, xml ) Need Help??


in reply to Re^2: RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)
in thread RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)

autodie both adds the file name to the error message and saves you from having to do the or die ...; dance:
# open.pl use strict; use warnings; use autodie; open HIGHLANDER, ">>/root/renew.cgi.highlander";
when run (as non a root user), gives:
+% perl open.pl Can't open '>>/root/renew.cgi.highlander' for appending: 'Permission d +enied' at open.pl line 6 +%
  • Comment on Re^3: RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-16 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found