in reply to Bad codes for SQL

#use CGI.pm to get user's input...
#connect to DSN...
$SQL=<<SQL;
select * from st
where st_name='$name'
SQL
if($dsn->Sql($SQL)){print $dsn->Error();}
...