in reply to Why repeated matches...
#!/usr/bin/perl -w use strict; my $file=shift; # get the name of file you # you are passing to script open (FH,$file) || die "Can't open - $!\n"; my @schools; while(<FH>) { if(//\s([\w ]+? PRIMARY SCHOOL)/) { push(@schools, $1); } } close FH;
|
|---|