M
mike
I need to have some global variables and am having some trouble getting
them defined correctly.
key parts of my pgm looks like:
use strict:
my %files = ();
&do_something
#display the contents of the hash
foreach my $key ( sort keys %files )
{
print "$files{$key}{uid} $file_cand{$key}{fileid}\n";
}
sub do_something
{
$files{'frank'} = {uid=>'frank',fileid=>'12345'};
$files{'mark'} = {uid=>'mark',fileid=>'23456'};
}
In the sub do_something it is telling me I have to explicitly define
at:
$files{'frank'} = {uid=>'frank',fileid=>'12345'};
Isn't that defined when I defined the hash?
Mike
them defined correctly.
key parts of my pgm looks like:
use strict:
my %files = ();
&do_something
#display the contents of the hash
foreach my $key ( sort keys %files )
{
print "$files{$key}{uid} $file_cand{$key}{fileid}\n";
}
sub do_something
{
$files{'frank'} = {uid=>'frank',fileid=>'12345'};
$files{'mark'} = {uid=>'mark',fileid=>'23456'};
}
In the sub do_something it is telling me I have to explicitly define
at:
$files{'frank'} = {uid=>'frank',fileid=>'12345'};
Isn't that defined when I defined the hash?
Mike