J
Jack
Hi some folks helped me with uniques in this context, but this is a
different beast..
trying to count the number of empty strings in a multidimensional array
column without creating too much memory overhead since I need to do
this for each column (and I dont want to create a new array just for
that column).. so I tried the below which is a similar approach to what
some experts on this site suggested for uniques, but didnt lend itself
to evaluating each value in the array as you will see in the code
below, any ideas would be appreciated -
Many thanks,
Jack
$nullcount= nulls(map { $_->[$p] } @multiarray);
push @nullcounts, $count;
$nullcount=0;
sub nulls
{
my %nulls = ();
if (/^\z/)) { $nulls{$1}++ foreach @_}
return keys %nulls;
}
different beast..
trying to count the number of empty strings in a multidimensional array
column without creating too much memory overhead since I need to do
this for each column (and I dont want to create a new array just for
that column).. so I tried the below which is a similar approach to what
some experts on this site suggested for uniques, but didnt lend itself
to evaluating each value in the array as you will see in the code
below, any ideas would be appreciated -
Many thanks,
Jack
$nullcount= nulls(map { $_->[$p] } @multiarray);
push @nullcounts, $count;
$nullcount=0;
sub nulls
{
my %nulls = ();
if (/^\z/)) { $nulls{$1}++ foreach @_}
return keys %nulls;
}