in reply to Why repeated matches...
while (my $line = <FH>) { $line =~ m/\s([\w ]+? PRIMARY SCHOOL)/ || next; push @schools, $1; }
Or you could get sneaky:
@schools = grep {/\s([\w ]+? PRIMARY SCHOOL)/; $_ = $1} <FH>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Why repeated matches...
by bart (Canon) on Dec 15, 2003 at 02:30 UTC |