#!/usr/bin/perl
print "Content-type: text/html\n\n";
open(FILE, "ca.dat");
while (<FILE>) {
if($_ =~ /(new\s*york)|bost(a|e)n/gi){push(@a, $_);}
}
close(FILE);
print "index numbers are:<br>\n";
foreach(@a)
{$_ =~ s/^(\d+)\s.*/$1/g;
print "$_<br>\n";}