in reply to 3par data acquistion

But most importantly I am looking for a way to exit when it hits the output "press the enter key to stop..."

Seems likely that the simplest solution might be to just kill the process;

my $pid = open SSH, '-|', qw[ ssh -l gmon 3par-S400 statvv -ni ] or di +e $!; my @lines; push @lines, $_ while ( $_ = <SSH> ) !~ m[Press the enter key to stop. +..]; kill 9, $pid; ## process data
Whether it is acceptable to kill an SSH session, and whether that will properly clean up the remote process and session you'll have to look up your docs or try it to find out.

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy