in reply to matching an array of alternates
This reads from STDIN, so invoke it like this:my $regex = join '|', @latin_am; while (<>) { print $1 if /$regex/; }
% foo.pl file
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Re: matching an array of alternates
by Zoogie (Curate) on Jun 23, 2000 at 23:54 UTC |