Help for this page

Select Code to Download


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