in reply to A Matter of Style in CGI

DBI things: 1. Check out the database handle attributes RaiseError, PrintError, and AutoCommit. For error checking(and catching) your DBI statements, especially in CGI scripts where you may not want to die(you might want to give a nice Error screen) when you have a bad problem, you can't beat RaiseError and "eval". 2. Get into the habit of using placeholders(?) - although they won't really buy you much here, you're bound to run into a situation where they will help with quoting issues and/or performance. Is use them *all* the time. 3. while (@_ = $sth->fetchrow_array()) { $emp_id = $_[0]; $emp_name = $_[1]; $dept = $_[2]; can be written to be more easily understandable this way: while (($emp_id, $emp_name, $dept) = $sth->fetchrow_array()) { no sense using array subscripts when it's not necessary. You might also have a look at fetchrow_hashref.

I'm also going to throw this one out there, just in case you're not familiar with the excellent documentation that comes with Perl - I worked for quite a few years with Perl myself before someone clued me in. If you're not familiar with the "perldocs", start by doing "perldoc perldoc" at a command prompt. You can see the perldocs for most any Perl module by doing "perldoc module name" at a command prompt. For example, to view the DBI perldocs, do "perldoc DBI".

My appologies if you already knew about this stuff.

HTH.