I have following perl script
#!/usr/bin/perl
$userinput = <STDIN>;
chomp ($userinput);
while ( $userinput ne "DONE")
{
print STDOUT "User typed -----> $userinput\n";
$userinput = <STDIN>;
chomp ($userinput);
}
I have copied this on on unix box, locally this works fine but when I try to run this perl script remotely from another box using ssh, it does not work.
I am running this script using following command.
ssh username@hostname /tmp/testremote.pl
It just hangs on the STDIN and does not return anything.
Any idea why this is not working?
/tmp/testremote.plmust exist on the remote machine -- does it?