in reply to Re: Global symbol "$session" requires explicit package name
in thread Global symbol "$session" requires explicit package name

Hmmm ,

...check the return value of Net::Telnet::Cisco->new() - whilst checking such return values (or utilising autodie) is, IMO, never a bad idea, this call _must_ have succeeded since Net::Telnet tells us that the default action on error (not overridden by your code) is to die.

Hence, since no such behaviour was forthcoming, we can infer that the call to the constructor must have been successful and thus a session opened.

A user level that continues to overstate my experience :-))
  • Comment on Re^2: Global symbol "$session" requires explicit package name

Replies are listed 'Best First'.
Re^3: Global symbol "$session" requires explicit package name
by muba (Priest) on Oct 17, 2009 at 02:17 UTC

    You're right: the call must have succeeded, then. And IMO you're right again: checking return values (or using autodie indeed) is never a bad idea.

    I'll be upfront with you. I was merely trying to advocate good practice. Thank you for pointing out I failed to live up to a very famous one: RTFM. I didn't care to check the docs so perhaps a mild apology is in order.