in reply to mod_perl and Global Variables
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"
|
|---|