Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Please advise how I can do this because I am not sure about opening it up and how flock works?Use File::Copy ... copy($a,$b) || die "$!";
open(INPUT, "<$a"); @data = <INPUT>; close(INPUT); open (OUTPUT, ">$a"); flock(OUTPUT, 2); copy($a,$b) || die "$!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Locking File for copy
by McDarren (Abbot) on Aug 02, 2006 at 02:00 UTC | |
|
Re: Locking File for copy
by duff (Parson) on Aug 02, 2006 at 03:21 UTC |