In perlmodlib :

vars        Predeclare global variable names (obsolete)

If this is obselete then what is the newer version of predeclare global variables?


Basically I just want to include config file (variables which can be changed by users, ie. path ) and it should available to all programs/modules.

Any better way other than use vars?



myconfig:
---------
$input_dir = "/home/yourname/data";
$tmp_dir = "/home/yourname/tmp";
# etc...
return 1;


myprogram.pl
------------
#!/usr/bin/perl

use strict;
use warnings;

use vars qw( $input_dir $tmp_dir);

require "/etc/myprogram/myconfig";

# etc...
#




--

--beast


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to