[Date Prev][Date Next][Thread Prev][Thread Next]
[Search]
[Date Index]
[Thread Index]
Re: [MacPerl] unknown error question
You know I tried to figure out why it would complain about the variable
being used only once when MacPerl doesn't require you to declare
variables there is a possibility that you would only use the variable
once.
BTW this is all of the code. I was having the warning in some other code
and decided to paste it into a new window and try it. So, I guess what
I am saying is, this doesn't make sense. As with computers, I have found
out, not making sense is normal. I am use to retyping errors and other
variable related errors, but telling you that you have only used a
variable once does not make sense. I guess someone out there knew
exactly what they were doing when they put it in there.
One of the respondents mentioned the keyword "my." Am I to understand
this is a way of declaring local variables? I have looked for it in
documentation but haven't run across it yet. I use Chris & Vicki's book
and the on-line documentation.
Thanks a bunch for the overwhelming response.
Robert Pollard
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
>
> TIA
>
> Robert Pollard
>
> ===== Want to unsubscribe from this list?
> ===== Send mail with body "unsubscribe" to macperl-request@macperl.org
===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org