#!/usr/bin/perl use strict; use warnings; open(my $fh,'data4.txt'); while(<$fh>){ print if /EDA/; }