On Mon, Apr 16, 2001 at 08:37:09PM +0100, Nic LAWRENCE wrote:
> Thought I'd have a go at securing one of my scripts after Ray's question
> about security. When using "strict", I am told the following:

Actually, it's having warnings on that causes this, not strict.  This,
incidentally, is a *good* thing. :-)

> Scalar value @views_keys[$k] better written as $views_keys[$k] at
> ./newremote2.pl line 327.
[snip] 
> I'm curious to know why for example something like @cview_cams[0] would be
> better written as $cview_cams[0]? If there's an faq which tells me WHY then
> if someone could point me to that I'd be very happy. ;-)

You can find full explanations of perl's warnings in the perldiag
manpage.  If you wish, using the diagnostics pragma will output the
appropriate explanation with the warning.  The reason for using an
actual scalar, rather than a one element slice can be found there.  I'd
put it in here, but vim is giving me some pasting problems at the
moment...

dha

-- 
David H. Adler - <[EMAIL PROTECTED]> - http://www.panix.com/~dha/
Linguists don't know much, but they do know that nobody can succeed in
telling people at large how to speak.   - Larry Wall

Reply via email to