Problems with perl script on 6.1/5.8.8

Josh Carroll josh.carroll at gmail.com
Tue Feb 6 20:41:07 UTC 2007


> Can't modify single ref constructor in lock at ./caldisp.pl line 84, near
> "*LOCKF)"
> Execution of ./caldisp.pl aborted due to compilation errors.

I'm not sure what has changed in Perl 5.8, but this should work instead:

if(open my $fh, "> $LOCKF") {
   lock($fh);
}

Josh


More information about the freebsd-questions mailing list