Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Can't get flock() to work. Please help...

by alain_desilets (Beadle)
on Aug 30, 2011 at 19:26 UTC ( [id://923288]=note: print w/replies, xml ) Need Help??


in reply to Re: Can't get flock() to work. Please help...
in thread Can't get flock() to work. Please help...

Cool! I have been using strict for years, but had never heard of warnings. I'll add that to my standard boilerplate code for Perl scripts. -- Alain
  • Comment on Re^2: Can't get flock() to work. Please help...

Replies are listed 'Best First'.
Re^3: Can't get flock() to work. Please help...
by GrandFather (Saint) on Aug 31, 2011 at 02:49 UTC

    Then change you file open boilerplate to:

    open my $fileIn, '<', $filename or die "Can't open $filename: $!";

    which uses the three argument form of open (you werre already actually, but just making it explicit), uses lexical file handles (with strict that would have caught your typo too) and reports open errors.

    True laziness is hard work

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-24 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found