@lines = `ssh REMOTE_SERVER cat /tmp/somefile.log`; my $flag; $flag = 1 if scalar @lines > 1;