From owner-freebsd-questions@FreeBSD.ORG Wed Apr 21 15:16:04 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67E9D16A4CE for ; Wed, 21 Apr 2004 15:16:04 -0700 (PDT) Received: from smtp.nildram.co.uk (smtp.nildram.co.uk [195.112.4.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1AEB43D46 for ; Wed, 21 Apr 2004 15:16:03 -0700 (PDT) (envelope-from mark@ukug.uk.freebsd.org) Received: from ukug.uk.freebsd.org (parish.gotadsl.co.uk [62.3.235.43]) by smtp.nildram.co.uk (Postfix) with ESMTP id 253182564C8; Wed, 21 Apr 2004 23:15:58 +0100 (BST) Message-ID: <4086F275.6070603@ukug.uk.freebsd.org> Date: Wed, 21 Apr 2004 23:15:17 +0100 From: Mark Ovens User-Agent: Mozilla Thunderbird 7.0 (Windows/20040410) X-Accept-Language: en-gb, en-us MIME-Version: 1.0 To: Kirk Strauser , freebsd-questions@freebsd.org References: <4086AF7E.5050102@ukug.uk.freebsd.org> <878ygpatfp.fsf@strauser.com> In-Reply-To: <878ygpatfp.fsf@strauser.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: perl coding ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 22:16:04 -0000 Kirk Strauser wrote: > At 2004-04-21T17:29:34Z, Mark Ovens writes: > >> $dup-number = substr($dup-counter, 0, length($dup-counter) - 1); > > Did you actually test that? I'm pretty sure Perl doesn't like dashes in > variable names: > > % perl -e '$foo-bar = 1;' > Can't modify subtraction (-) in scalar assignment at -e line 1, near "1;" > Execution of -e aborted due to compilation errors. You are quite correct; I just copied the OP's variable names. He has since sent me a copy of the script and it does use '_' rather than '-' so I guess it was a typo in his e-mail. Thanks for pointing it out. Regards, Mark