in reply to System call to ssh stalling.

This worked for me.
#!/usr/bin/perl use strict; use warnings; while (1) { print "enter cmd: "; unless (my $c = <STDIN>) { last; } else { system( "ssh 127.0.0.1 $c" ); last; } }