my $ps_output = $ssh->exec( 'ps efax 2>/dev/null' ); my @stat = ( $ps_output =~ /firstbo.*/g ); my $stat = scalar @stat;