I am running a perl script over ssh like the below:
[dipuh@local ~]$ ssh dipuh@myremote_001 'perl /home/dipuh/a.pl'
The content of a.pl is the below:
print "Sleeping \n";
sleep(60);
print "Waking Up";
Here my local terminal waits for the perl script to execute completely and once finished displays the complete output. The initial "Sleeping" text also will be printed only with the final output.
Is there any way, in my local terminal, I can display the output of each command in the perl script at the run time, instead of waiting for the whole perl script to finish.