#!/usr/bin/perl
$tfile = $ARGV[0];
$tmpfile = "/home/terri/temp.txt";

#open the file
open(FILE,"< $tfile") or die "Can't open $file";
#slurp the file
my @file = <FILE>;
my $entire = join "",(@file);
close FILE;

$entire =~ s/class="menspace"/class="genspace"/gi;
$entire =~ s/class="menlist"/class="genlist"/gi;

open(BRD,"> $tmpfile");
print BRD $entire;
close BRD;

# Mv the file
$cmd = "mv $tmpfile $tfile";
system($cmd);

