It would help to actually read the file data (untested change)
sub gethash { my $fh = shift; local $/; local $_ = <$fh>; s/^\s+//gm; s/[\t]+/\t/g; my %hash; while(/^name\s+(\S+)\n(num.*\n)*/gm ) { my $name = $1; $hash{$name} = [$& =~ /^num\s*(.*)/gm ]; } return %hash; }
In reply to Re^3: how to push multiples row of values into hash and do comparison
by tybalt89
in thread how to push multiples row of values into hash and do comparison
by darkmoon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |