[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] unknown error question -- used only once --



At 5.21 -0400 1999.06.10, Larry F. Allen-Tonar wrote:
>The particular error is caused by your using the variable
>        $holdingThing
>exactly one time.  If you think you used the same variable
>somewhere else, one or the other is a typo or out of scope.

>At 4:38 PM 06/09/1999, Robert Pollard wrote:
>>Hey guys,
>>
>>Could anyone tell me why the following code produces the following
>>error:
>>
>>CODE:
>>#! perl -w
>>
>>$holdingThing = 'Backup Folder';
>>
>>ERROR:
>># Name "main::holdingThing" used only once: possible typo.
>>File 'Untitled #3'; Line 3

Just a quick note that technically this is not an error, but a warning.  It
does not affect the execution of the code at all.  Errors end the program,
warnings don't.  See perldiag.pod ("Various Perl diagnostics" under Help)
for (what should be) a complete list of all warnings and errors.  Also, you
can get more information with "use diagnostics":


#! perl -w
use diagnostics;
$holdingThing = 'Backup Folder';
__END__

# Name "main::holdingThing" used only once: possible typo.
File 'Bourque:Desktop Folder:Untitled1'; Line 3 # (#1)

    (W) Typographical errors often show up as unique variable names.
    If you had a good reason for having a unique name, then just mention
    it again somehow to suppress the message.  The use vars pragma is
    provided for just this purpose.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org