Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Can't use an undefined value as an ARRAY reference

by ikegami (Pope)
on Aug 05, 2014 at 20:29 UTC ( #1096352=note: print w/replies, xml ) Need Help??

in reply to Perl array reference error

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'};

Replies are listed 'Best First'.
Re^2: Can't use an undefined value as an ARRAY reference
by user786 (Sexton) on Aug 05, 2014 at 21:28 UTC
    thanks,it works

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1096352]
[Discipulus]: the whole weekend was dedicated to a marionette representation done for all the children of our family / clan and thei friend. 2+ hours divided in three acts + snack time
[Discipulus]: this is tradition since times of the grandfather of my father with many marionette / puppets and paintings of 1950 an before

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2017-03-27 07:25 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (317 votes). Check out past polls.