Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 (Acolyte) 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 avoiding work at the Monastery: (6)
As of 2014-12-25 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls