RPrinceton
Programmer
Hi,
I am still in the process of coming up with best practices with regard to Perl. I am processing the same database in many scripts. Obviously for brevity the database variables
should remain the same throughout the scripts. I decided to put all of the database variables in a file, to be included in those scripts that required database processing. This will cut down on errors due to typos. The 'use' and 'require' allow my external file named dbinc.pm to be included in my main program. I know I can access the variables in file dbinc.pm by using the $dbinc::varnm syntax. I would like to not have to qualify every reference to a variable with dbinc::. Is there a way to accomplish this...perhaps something like use dbinc qual=>dbinc or some such thing at the time of including the file? Please advise. Thanx in advance. Regards,
Randall Princeton
I am still in the process of coming up with best practices with regard to Perl. I am processing the same database in many scripts. Obviously for brevity the database variables
should remain the same throughout the scripts. I decided to put all of the database variables in a file, to be included in those scripts that required database processing. This will cut down on errors due to typos. The 'use' and 'require' allow my external file named dbinc.pm to be included in my main program. I know I can access the variables in file dbinc.pm by using the $dbinc::varnm syntax. I would like to not have to qualify every reference to a variable with dbinc::. Is there a way to accomplish this...perhaps something like use dbinc qual=>dbinc or some such thing at the time of including the file? Please advise. Thanx in advance. Regards,
Randall Princeton