HI
I have as hash within my script.pl file which look like this
my %verticals = ( 'auto_v1' => {
'tempdir' => '/var/www/html/temp/auto' ,
'svnurl' => 'http://svn.int.com/repos/a.com/branch/auto',
'excludes' =>
'uploaded_images|includes/config.php|admin/includes/config.php|.svn',
'tarpath' => '/var/www/html/temp/autotar/',
'tarname' => 'auto',
'rmtrootdir' => '/var/www/projects/auto/',
'rmttmpdir' => '/var/www/html/temp/autotar/',
'rmtserver' => '192.168.1.26',
'rmtuser' => 'root',
'rmtpass' => 'password'
},
'auto_v2' => {
'tempdir' => '/var/www/html/temp/auto' ,
'svnurl' => 'http://svn.int.com/repos/a.com/branch/auto',
'excludes' =>
'uploaded_images|includes/config.php|admin/includes/config.php|.svn',
'tarpath' => '/var/www/html/temp/autotar/',
'tarname' => 'auto',
'rmtrootdir' => '/var/www/projects/auto/',
'rmttmpdir' => '/var/www/html/temp/autotar/',
'rmtserver' => '192.168.1.27',
'rmtuser' => 'root',
'rmtpass' => 'password'
},
'auto_v3' => {
'tempdir' => '/var/www/html/temp/auto' ,
'svnurl' => 'http://svn.int.com/repos/a.com/branch/auto',
'excludes' =>
'uploaded_images|includes/config.php|admin/includes/config.php|.svn',
'tarpath' => '/var/www/html/temp/autotar/',
'tarname' => 'auto',
'rmtrootdir' => '/var/www/projects/auto/',
'rmttmpdir' => '/var/www/html/temp/autotar/',
'rmtserver' => '192.168.1.28',
'rmtuser' => 'root',
'rmtpass' => 'password'
}
);
### code follows
:
:
But it obviously looks too messy to add it all in one script.pl , as
i am going to add new keys and values to the hash , and as i am going
to keep adding to the hash later on i would need to automatically
generate my hash from a database, what is the best way to maintain the
config file which will contain the hash , and how do i use it within
multiple scripts .
--
Regards
Agnello D'souza
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/