in reply to Piping children?
Personally I would set ssh keys up so that the remote machine trusted the local one for autologin, then I would:
my $command = "ssh $machine 'tail -f /var/log/2001-log'"; open(REMOTE, "$command |") or die "Can't run \"$command\": $!"; while (my $line = <REMOTE>) { ... }
|
|---|