From owner-freebsd-questions@FreeBSD.ORG Wed Feb 7 09:37:02 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF81116A48F for ; Wed, 7 Feb 2007 09:37:00 +0000 (UTC) (envelope-from jonathan@hst.org.za) Received: from sirian.hst.org.za (sirian.hst.org.za [209.203.2.130]) by mx1.freebsd.org (Postfix) with ESMTP id BF29413C491 for ; Wed, 7 Feb 2007 09:36:58 +0000 (UTC) (envelope-from jonathan@hst.org.za) Received: from localhost (localhost.hst.org.za [127.0.0.1]) by sirian.hst.org.za (Postfix) with ESMTP id 1CA1831C823 for ; Wed, 7 Feb 2007 11:13:04 +0200 (SAST) Received: from sirian.hst.org.za ([127.0.0.1]) by localhost (sirian.hst.org.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 89697-01 for ; Wed, 7 Feb 2007 11:13:03 +0200 (SAST) Received: from sysadmin.int.dbn.hst.org.za (sysadmin.int.dbn.hst.org.za [10.1.1.20]) by sirian.hst.org.za (Postfix) with ESMTP id 6556631C81A for ; Wed, 7 Feb 2007 11:13:01 +0200 (SAST) From: Jonathan McKeown Organization: Health Systems Trust To: freebsd-questions@freebsd.org Date: Wed, 7 Feb 2007 11:12:08 +0200 User-Agent: KMail/1.7.2 References: <005501c74a2c$d4f45fb0$0300020a@mickey> In-Reply-To: <005501c74a2c$d4f45fb0$0300020a@mickey> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702071112.08745.jonathan@hst.org.za> X-Virus-Scanned: by amavisd-new at hst.org.za Subject: Re: Problems with perl script on 6.1/5.8.8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2007 09:37:02 -0000 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