http://www.perlmonks.org?node_id=1092018


in reply to Net-SSH-Expect & Fedora-18

It serves no purpose to wait for the command shell to be killed. Exit the shell after "reboot", or better yet, issue an "exec reboot".