Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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


Comment on Re: Can't use an undefined value as an ARRAY reference
Select or Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1096352]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (14)
As of 2015-07-06 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (73 votes), past polls