Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know how to (or has done) file locking or flock a process generated using the Config::IniFile modual?
my $cfgPass = new Config::IniFiles( -file => "/TARS/ESS/JABIL_ESS.ini" + ); my $lock = new File::Flock '$cfgPass' || die "problem opening $cfgPass +\n";

Replies are listed 'Best First'.
Re: lock config::IniFile
by jdalbec (Deacon) on Feb 07, 2005 at 04:33 UTC
    The single quotes prevent variable interpolation so you are trying to lock a file called $cfgpass in the current directory. Try using double quotes or no quotes.
Re: lock config::IniFile
by Anonymous Monk on Feb 06, 2005 at 20:22 UTC
    Also the code (not complete) is something that was tryed but did not work