Date: Wed, 7 Feb 2007 11:12:08 +0200 From: Jonathan McKeown <jonathan@hst.org.za> To: freebsd-questions@freebsd.org Subject: Re: Problems with perl script on 6.1/5.8.8 Message-ID: <200702071112.08745.jonathan@hst.org.za> In-Reply-To: <005501c74a2c$d4f45fb0$0300020a@mickey> References: <005501c74a2c$d4f45fb0$0300020a@mickey>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 06 February 2007 22:24, Don O'Neil wrote: > I've got a perl script that just refuses to run on my new 6.1 box with Perl > 5.8.8... Whenever I run it from the command line I get this: > > Can't modify single ref constructor in lock at ./caldisp.pl line 84, near > "*LOCKF)" > Execution of ./caldisp.pl aborted due to compilation errors. > > The lines in question are: > > if (open (LOCKF, ">$LOCKF")) > { > lock (\*LOCKF); > } No real comment on the error, but shouldn't you be using flock() rather than lock()? flock is for locking files, lock is for locking shared variables in threads (unless of course you have a lock() subroutine defined somewhere, in which case it overrides the CORE::lock). See perldoc perlopentut for details (it's hard to say more without more context). Jonathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702071112.08745.jonathan>