Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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
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?
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 scrutinizing the Monastery: (2)
As of 2016-02-09 04:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (301 votes), past polls