Initial Perl Script as Craig created