in reply to Re: XML::Simple broken in 5.8.0?
in thread XML::Simple broken in 5.8.0?

And just to clear up potentially confusing use of the term 'lock' ...

In a multi-threaded environment, if two threads have access to the same variable, then locking must be used to ensure that each thread can safely read/write the variable without corrupting it.

In a multi-process (or for that matter multi-threaded) environment if two processes (or threads) have access to the same file, then then locking must be used to ensure that each thread can safely read/write the file without corrupting it.

The Fcntl module (in combination with the built-in 'flock' function) is used for file locking. The 'lock' function is provided by Perl's threading implementation and is used for locking variables.