in reply to Perl script not running through

Without even looking past use Switch; I can tell it is because you're using Switch. Probably. :)