D
dn.perl
use English ;
Within a single-file script, I tend to use the following method to
pass arguments :
$rh_result_set = &main::get_data( {
rh_query => $rh_query,
rh_db_details => $rh_db_details,
db_name => $db_name } );
sub get_data
{
my $rh_query = $ARG[0]{rh_query};
my $rh_db_details = $ARG[0]{rh_db_details};
}
Is it possible, and if possible is it advisable, to pass parameters to
a function in a module in this manner?
-------
Within a single-file script, I tend to use the following method to
pass arguments :
$rh_result_set = &main::get_data( {
rh_query => $rh_query,
rh_db_details => $rh_db_details,
db_name => $db_name } );
sub get_data
{
my $rh_query = $ARG[0]{rh_query};
my $rh_db_details = $ARG[0]{rh_db_details};
}
Is it possible, and if possible is it advisable, to pass parameters to
a function in a module in this manner?
-------