I keep getting error message: Bareword "LOCK_EX" not allowed while "strict subs"use strict; my $listFile = "C:\\theData.xls"; my $listFile2 = "\\\\AnotherServer\\dir\\"; open (IN, "$listFile") || die "Cant open $listFile for reading: $!"; flock(IN, LOCK_EX) || die "Cant get LOCK_SH on $listFile: $!"; print(IN); system("copy $listFile $listFile2 > nul") == 0 || die "Copy failed."; print "Copy completed"; close IN || die "Cant close $listFile: $!";
In reply to Lock on file by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |