#!/usr/bin/perl use warnings; use strict; print grep{!/intron/ unless /splice_region&intron/}; #Update: the English explanation: # exclude lines with "intron" except if that line # contains "splice_region&intron". =Prints: whehehe shshshs hshshsh #should pass thru som splice_region&intron intron 98797 #should pass wqer splice_region&intron poiy #should pass =cut __DATA__ something intron asdfasdf #should be deleted whehehe shshshs hshshsh #should pass thru som splice_region&intron intron 98797 #should pass wqer splice_region&intron poiy #should pass