Help for this page
use IO::File (); ... # now you can pass $fh directly to your sub # as in code_lock( $fh ); # sub code_lock { my $fh = shift(); }
use Symbol(); my $fh = Symbol::gensym(); open($fh,">".LOCK_FILE); # pass it as in the above