use FileUtil; my $f = shift; my $fh = FileUtil::openFileHandle($f); while (<$fh>) { my $a = $_; $_ = <$fh>; s/.{26}//; $b = $_; $_ = <$fh>; $c = $_; $_ = <$fh>; s/.{26}//; $d = $_; if (length($b) > 15) { print "$a$b$c$d"; } } $fh->close();