instead of$foo{3}{NAME1}
But that's just me.$foo{NAME1}{3}
sub OpenFF { my($file, $dlmt) = @_; $dlmt = "\t" unless defined $dlmt; my $hash = {}; open READ, $file or return; chomp(my $head = <READ>); my @headers = split $dlmt, $head; while (<READ>) { chomp; my @columns = split $dlmt; @{$hash->{$columns[0]}}{@headers} = @columns; } close READ; return $hash; }
In reply to Re: Another flatfile thingy
by btrott
in thread Another flatfile thingy
by BBQ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |