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