Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by alain_desilets (Beadle)
on Aug 30, 2011 at 19:26 UTC ( #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...
Re^3: Can't get flock() to work. Please help...
by GrandFather (Cardinal) 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
Node Status?
node history
Node Type: note [id://923288]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2014-07-10 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (213 votes), past polls