#!/usr/bin/perl
# w6.1.pl:  Access info in flat data file w6.1.fdb

$/ = "";			#Perl for paragraph mode, blank line = \n\n
open (FH, "w6.1.fdb");
while (<FH>){
# print ("$_\n");
  @record = split(/\n/, $_);
  if ($record[2] =~ m/math/i){
  print ("$record[1] $record[0] lists math as a field.\n");
  }  
}

