Or you could go to the same system your school probably
uses for this purpose. Replace "Th" with "R" and all
is well. Since the chances of a Sunday class are very
low , using "S" for Saturday is probably a reasonable
choice, as well.
Yes, I know, not a perl/split solution, but since
it sounds like he's generating his own input data, why
not be lazy where it's easiest?