#!/usr/bin/perl -w use strict; my $fh; open($fh, "zcat outfile.gz |") || die $!; print $fh, "\n"; while( <$fh> ) { print $_ } if( "abc" eq "abc" ) { print "abc is abc\n"; } else { print "my world is shattered\n"; }