Date: Wed, 21 Apr 2004 23:15:17 +0100 From: Mark Ovens <mark@ukug.uk.freebsd.org> To: Kirk Strauser <kirk@strauser.com>, freebsd-questions@freebsd.org Subject: Re: perl coding ? Message-ID: <4086F275.6070603@ukug.uk.freebsd.org> In-Reply-To: <878ygpatfp.fsf@strauser.com> References: <MIEPLLIBMLEEABPDBIEGMEHHFMAA.Barbish3@adelphia.net> <4086AF7E.5050102@ukug.uk.freebsd.org> <878ygpatfp.fsf@strauser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Kirk Strauser wrote: > At 2004-04-21T17:29:34Z, Mark Ovens <mark@ukug.uk.freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4086F275.6070603>