in reply to Printing matched lines

change:
while (<PINGALLIP>) { if (/is alive/) { chomp; print ALIVEIP $_; } }
to:
while (<PINGALLIP>) { if ($_ =~ /is alive/) { chomp; print ALIVEIP $_; } }
That will apply the m// operator to magic variable $_, which is the current line of your while loop.