Hi All.
I have symple hash in module (ModuleName), for example:
my %exec;
$exec{'cat'} = '/bin/cat';
$exec{'grep'} = '/bin/grep';
$exec{'host'} = '/usr/bin/host';
I want module export scalars with 'on fly' generated (from this hash) names=hash keys, and scalars values=hash values.
As the result, I need to import scalars in a script:
use ModuleName qw($cat $grep $host);
Where should be:
$cat = '/bin/cat';
$grep= '/bin/grep';
$host = '/usr/bin/host';
Is it possible in Perl?
Thanks.
I have symple hash in module (ModuleName), for example:
my %exec;
$exec{'cat'} = '/bin/cat';
$exec{'grep'} = '/bin/grep';
$exec{'host'} = '/usr/bin/host';
I want module export scalars with 'on fly' generated (from this hash) names=hash keys, and scalars values=hash values.
As the result, I need to import scalars in a script:
use ModuleName qw($cat $grep $host);
Where should be:
$cat = '/bin/cat';
$grep= '/bin/grep';
$host = '/usr/bin/host';
Is it possible in Perl?
Thanks.