You must check each one. Your result is always 'true' because $output1 is always 'true'.
UPDATE: Consider using Regexp::Common::net to test for IP's.
if ( $output1 =~ m/\d+\.\d+/m or $output2 =~ m/\d+\.\d+/m ) {
Your use of /g is inappropriate.
In reply to Re: Regex match multiple line output
by BillKSmith
in thread Regex match multiple line output
by bartrad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |