in reply to ORDER BY COUNT(*)?

nit-picking...

In the example code you provided above, you refer to individual array elements like this: @result[1]. If you had utilized -w you would have received this helpful error message:

Scalar value @result[1] better written as $result[1] at FOO line 17.
You can read more about -w in perlrun.

--Dave

Replies are listed 'Best First'.
Re: Re: ORDER BY COUNT(*)?
by peppiv (Curate) on Mar 20, 2002 at 17:04 UTC
    Thanks redsquirrel I'll definitely read more. However, I do have -w in my #!/usr/bin/perl -w.

    peppiv
      However, I do have -w in my #!/usr/bin/perl -w.
      The warning is being sent to your web server error log. You'll make sysamdin types happy by writing scripts that don't fill up error logs with gobbledy-gook every time someone executes your script.

      I have found it helpful to test CGI's from the command line using this command:

      perl -cw your_script.pl
      This will not execute the script, but will display many helpful warnings.

      --Dave

        Dunno how to quote people's stuff but...

        redsquirrel - Thankyou for your "perl -cw your_script.pl" pointer.

        Fortunately I am the sysadmin (my play/learning box) but I still don't want to fill my logs with rubbish. Just in case I ever need to review them.

        I would of course first have to work out where they acutally live but that is a moot point.

        Will do. Thanks.

        peppiv