in reply to Re: grep fields
in thread grep fields
I want any records ... that have a given email address in the 4th field
In that case, a direct string comparison is probably better (or at least simpler...) than a regex, along the lines of:
my $adr = 'example@hotmail.com'; my @goodrecs; for (@recs){ push @goodrecs, $_ if (split /:/)[3] eq $adr; }
This can doubtless be 'grepped', but I don't see why you should care...
dave
|
|---|