in reply to mod_perl and Global Variables

I'm not sure exactly what you are asking for here, but when I write scripts using DBI and DBD, I always put the parameters into variables (i.e. user name, password, db, server) so the script can be easily modified.
if(! $U){ $U = "foo"; } if(! $S){ $S = $ENV{"DSQUERY"};} if(! $S){ $S = "sybase"; } if(! $P){ $P = "foo_pw"; } if(! $DB){ $DB = "info"; }

The above is specific to Sybase, which uses an interface file and the DSQUERY environment variable to identify which server to query. The necessary variables default to a particular user name, password, server, and database, and will permit the script to run on a command line as well as a cgi script. If The script needs to query a different database, then all the user needs to do is change the default variables near the beginning of the script.

-----
"Computeri non cogitant, ergo non sunt"