Hopefully you can tell what I'm trying to do.Maybe it's just me, but I'm not sure at all what you're attempting to do with that last line. Could you explain a bit more?
On a very minor note: unless you've changed the value of $/ somewhere earlier in your script, the chomp @row line in your while() loop probably isn't doing anything.
Actually, you could get rid of @rows altogether and just assign the output of the split to @data{@fields}, but whether you should is a somewhat 'religious' issue that has no bearing on the question you are actually asking. :)
UPDATE: Is $menudir supposed to be an array reference of the value of key 'ven' from each of the hash references? If so, you might try something like:
my $menudir = [map { $_->{ven} } @records];
In reply to Re: Assigning a variable to a Hash key reference
by mattriff
in thread Assigning a variable to a Hash key reference
by malaga
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |