in reply to Matching prompt in Net::Telnet

You could capture the entire result and then grep the result for the value you need to find.
my @result = $t->cmd('who'); if (grep /pkmsqa/, @result){ .... }