in reply to dbi with cgi

You have to declare the $sno and $name variables before assignment when using strict:
... $sth->execute; my ($sno, $name) = $sth->fetchrow_array; ... print $q->p("$sno, $name"); ...

izut

Replies are listed 'Best First'.
Re^2: dbi with cgi
by davidrw (Prior) on Jun 24, 2005 at 16:58 UTC
    good catch.
    For the OP: (btw, it's good you have 'use strict' -- you can also add 'use warnings' for additional, well, warnings :) ) this would have been obvious by just doing perl -c script.pl in a dos prompt. Also, you can actually run it like perl script.pl and see what the actual HTML output is (or error messages).