in reply to naming array from a scalar

George,
You can create a hash of arrays.
That way your array is 'named' by hash
However your foreach loop dosen't make much sense to me in this context. I think you need to declare $val perhaps?
my %hash; foreach my $val(@array){ push @{$hash{$val}}, database_call($val) }
To then print a particular named array
foreach(@{$hash{$val}}){ print $_ } #to find a particular item in a particular array print $hash{$val}[$arrayid]

Replies are listed 'Best First'.
Re^2: naming array from a scalar
by Anonymous Monk on Nov 10, 2009 at 01:29 UTC
    Thanks much..That works for me.
    -George