Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: ORDER BY COUNT(*)?

by redsquirrel (Hermit)
on Mar 20, 2002 at 16:46 UTC ( [id://153020]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://153020]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found