This has been asked before a couple of times, but none of those answers seem to work for my situation.
My code:
open(FILE, "<", $fileb) or die "File not openable: $!";
while (<FILE>) {
$filebmeta[$line] = (data => $_, match => -1);
$line++;
}
close(FILE);
$line = 0;
for my $hashref (@filebmeta) {
print "$hashref->{data}\n";
}
when I run this code it spits out: 'Can't use string ("-1") as a HASH ref while "strict refs" in use at ./partc.pl line 152.'
Any idea why this is happening? I don't seem to be able to dereference the hash properly in the loop.