Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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?

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.

    Sparky
    FMTEYEWTK

      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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045702]
help
Chatterbox?
[Corion]: marto: Yep, but I didn't make it up north, sorry ;)
[Corion]: But LPW was enjoyable, even though it's always a bit hectic due to cramming everything into one day
[Corion]: I have no feeling about how my talk was received, but I'm happy with it, which counts the most to me ;-D
[Corion]: Also, London is always a nice visit, as I got to meet a friend there, and spent some time offline, working on "minor" features of the shadertoy thing ;)
[marto]: maybe next year when the kids are a little older I'll have time to attend perl events in Europe
[Corion]: marto: Yeah - there isn't a Perl Day-Care at Perl events - we thought about it for YAPC::Europe 2012 but it's a gigantic effort to organize that

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2016-12-07 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (125 votes). Check out past polls.