Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Perl SSH2

by PilotinControl (Monk)
on Jul 22, 2013 at 19:09 UTC ( #1045702=note: print w/ replies, xml ) Need Help??

in reply to Re: Perl SSH2
in thread Perl SSH2

In further review the stand alone script performs the function and the script windows exits after the " sleep 5; " function in the larger program the sub routine does not close down as the main program stays on to perform other functions. I need the " sub stopservices " to exit. In that case a while loop would be needed? Or should I head in a different direction? Thoughts?

Comment on Re^2: Perl SSH2
Replies are listed 'Best First'.
Re^3: Perl SSH2
by sparkyichi (Deacon) on Jul 22, 2013 at 21:48 UTC
    Can you provide more detail about the main script?

    How do you know stopservices is running and hasn't been skipped?

    If you need to get out of a sub you can use "return($var)" to return to the calling routine.


      It was a simple fix it seems $chan->blocking(0); was keeping the script from properly executing a command. Thanks for the input it made me look closer at the code in depth instead of just surface.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045702]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2015-10-14 03:18 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (320 votes), past polls