in reply to Re: Can't grab $ARGV[n] in thread Can't grab $ARGV[n]
If there were an error in scalar references, wouldn't the command window return some errors?
And about using strict, I've tried it in a handful of other scripts and when I run them I always get these Global symbol $whatever requires explicit package name errors when I use it. Two thirds of the time, when I take the use strict; line out, it works. This is why I never use strict, though I'm sure it would help me if i better understood it.
Re: Re: Re: Can't grab $ARGV[n]
by Gerard (Pilgrim) on Mar 05, 2004 at 03:55 UTC
|
In when you are using strict you have to declare your varibles with the mykey word. ie my $foo = "a bar"; then when you use it later on you can just say $foo = "two bars";. The warning you are getting appears when the variables have not been declared in this way. This is helpful beacuse if you mis-spell a variable then you will be warned of the fact. This has saved me about 250,000 times from stupid typos and the like. There are other reasons too I am sure, but this is why I use it.
Hope this helps. | [reply] [d/l] [select] |
Re: Re: Re: Can't grab $ARGV[n]
by runrig (Abbot) on Mar 05, 2004 at 19:02 UTC
|
| [reply] |
|