I'm pretty much a newbie and should be reading more than contributing, but
one of my professors insisted that we troubleshoot all of our classroom
assignments by running our Perl programs from the command line.  I've
continued this practice in my post-classroom life.

Keith
Clear Lake

-----Original Message-----
From: Bradshaw, Brian [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 08, 2001 4:44 PM
To: [EMAIL PROTECTED]
Subject: RE: I just don't get it....


I wish I new. The browser just says "There is an Internal Error. Cotact the
administrator" along with contact details and date information.

-----Original Message-----
From: David H. Adler [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 08, 2001 5:24 PM
To: [EMAIL PROTECTED]
Subject: Re: I just don't get it....


On Fri, Jun 08, 2001 at 05:00:08PM -0400, Bradshaw, Brian wrote:
> I have the code:
> 1.    $queryCat = "select project_number from prod_cat_xref where
> category_1_id=$category";
> 2.    print "$queryCat <BR>\n\n";
> 3.    $setCat = $wgDB->query($queryCat);
> 4.    # %resultCat = $setCat->fetchhash();
> 5.    while (%resultCat = $setCat->fetchhash())
> 6.    {
> 7.       print "Hi Dude $resultCat{project_number} <BR>\n";
> 8.    }
>
> On line 7, if I use parens () instead of curlies {}, I get an error.
> However, in an existing script on our catalog, that exact line (minus the
> "Hi Dude") with the parens works within a while loop.

What error are you getting?  As far as I can tell, that line would print

        "Hi Dude (project_number) <BR>\n"

rather than give an error ($resultCat being undef).

dha

--
David H. Adler - <[EMAIL PROTECTED]> - http://www.panix.com/~dha/
Perl should only be studied as a second language.  A good first
language would be English. - Larry Wall

Reply via email to