That means $self->{'netstat_array'} is sometimes undefined, which means it doesn't contains a reference to an array.
If it's suppose to be undefined at times, then maybe you're looking for
$self->{'netstat_array'} ||= []; return scalar @{ $self->{'netstat_array'} }, $self->{'netstat_array'};
In reply to Re: Can't use an undefined value as an ARRAY reference
by ikegami
in thread Perl array reference error
by user786
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |