in reply to Problem initializing an object as an instant variable
$self -> {'telnetConn'} => new Net::Telnet( Timeout => 10, errmode => # if connection is unsuccessful ( sub { $self -> {'full_info'} = CLIENT . ",," . $ip . ",TIMEO +UT"; $self -> {'fault'} = "-No Response"; $self -> {'time_out'} = 1; } ) );
You don't have an assignment. You used '=>'.
Please get used to the more correct object instantitation idiom Net::Telnet->new. There are articles out there explaining the subtle differences and pitfalls.
Best regards
|
|---|