problem in assigning hash variable.
Posted on 2006-03-21
I have one defs.h file which is made at run time.
Another file use this defs.h file and I want to assign a hash variable from defs.h
file to a local hash variable.
I cannot require this defs.h file as it is made at run time.
I am unable to assign that variable.
code is goes like this:
our %global_hash = ('car'=> 'lanser','bike'=> 'ducati');
my $file = "defs.h";
if($_ =~ /\%global_hash/)
chop($_); # chop newline
chop($_); # chop ;
my $pos = index($_,"=");
my %local_hash =
my @ky = keys %scp_hash;
my @vl = values %scp_hash;
I m not getting the values in %local_hash.
can u help me in this case.I can't require defs.h file.