in reply to Hash table issue

You have a couple of errors in your print loop, corrected below

foreach (keys %info) { print "\t$info{$_}->[0]\t$info{$_}->[1]\t$info{$_}->[2]\t$info{$_} +->[3]\n"; }
You can clean it up further like this,
for (values %info) { print "\t", join("\t", @$_), "\n"; }

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Hash table issue
by Anonymous Monk on May 08, 2004 at 21:42 UTC
    thanks Zaxo , but the issue I am still having is I am using the same hash table for somthing elese . Is it better to create a new hash table or can I do the following :
    foreach (keys %info{EmpNum}) { print "\t$info{$_}->[0]\t$info{$_}->[1]\t$info{$_}->[2]\t$info{$_} +->[3]\n"; }
    I have $info{time} , $info{list} ...just wondering if I can use the same one. thanks