in reply to Hash reference undefined somewhere?
Always use strictures (use strict; use warnings;)!
GetHosts takes a reference parameter which you assign to a local variable $ref_data. Later in the same function you redefine the variable twice (inside the if)! That is three different variables using the same name in the same function. That can not be right. With strictures on you would get:
"my" variable $ref_data masks earlier declaration in same scope at ... Use of uninitialized value $new_ip in concatenation (.) or string at . +..
which happens to tell you exactly where the problems are. Did I mention "Always use strictures (use strict; use warnings;)" already? You really, really should.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Hash reference undefined somewhere?
by bowei_99 (Friar) on Mar 09, 2011 at 23:49 UTC | |
by GrandFather (Saint) on Mar 09, 2011 at 23:59 UTC | |
Re^2: Hash reference undefined somewhere?
by bowei_99 (Friar) on Mar 09, 2011 at 23:46 UTC |