Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 ( #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
Node Status?
node history
Node Type: note [id://811271]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2019-11-22 20:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (113 votes). Check out past polls.

    Notices?