while (<>) { chomp; @a = split if ($_ ne "==.*"); print "@a\n"; }