#!/usr/bin/perl -w use Switch; use strict; print "Enter a set name: "; my $set = ; chomp $set; my $lset = lc($set); my $source = "$lset.htm"; my $destination = "$lset.txt"; open SRC, "< $source" or die "Can't open source: $!\n"; open DST, "> $destination" or die "Can't open destination: $!\n"; my $state = 0; my $name; my $rate; my $max; my $med; my $min; while () { my $s = $_; chomp $s; if ($state == 0) { if ($s eq "") { $state = 1; next; } } elsif ($state == 1) { if ($s =~//) { $state = 2; next; } } elsif ($state == 2) { if ($s =~/>([\w ',]+)<\/a>/) { $name = $1; $state = 3; next; } } elsif ($state == 3) { if ($s =~/