in reply to Printing matched lines

grep 'is alive' log.dat > out.dat

Or if you really want to do this in Perl:
# Assuming file name is in $ARGV[0] while(<>){ print if /is alive/; }
or just

perl -ne "print if /is alive/" log.dat > out.dat

--perlplexer