in reply to Multidimensional arrayrefs constructed from anonymous arrayrefs

You're missing an @ in front of $values. You're assuming that you know the maximum size of the inner arrays (101 elements each). And your code doesn't run under strict.pm. Something like this (untested) avoids all of these issues:
foreach my $row (@$values) { @$row = grep {$_ ne "UNKNOWN"} @$row; }
Though if I'm working with an array of arrays, I don't generally want to just eliminate random elements and let the other ones move around. I generally think of position $i, $j as coordinates that should remain fixed. But YMMV.
  • Comment on Re: Multidimensional arrayrefs constructed from anonymous arrayrefs
  • Download Code