Perl How to exit from child script which does a telnet? -



Perl How to exit from child script which does a telnet? -

i have script executes few commands , telnets machine. need phone call script perl script.

$result = `some_script.pl`;

the script some_script.pl executes not able exit main script script waits @ telnet prompt.

i need capture exit status of script in order create sure some_script.pl executed successfully.

i cannot modify some_script.pl.

is there way can issue quit after some_script.pl executed successfully?

try out, 'magic' close standard in/out/err , may allow programme finish.

$result = `some_script.pl >&- 2>&- <&-';

otherwise utilize open2 , expect watch specific string (like done!) in programme output , close when done.

http://search.cpan.org/~rgiersig/expect-1.15/expect.pod

regards

perl telnet exit

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -