in reply to Switch statement giving out error

Don't use Switch, it is flaky and deprecated and no longer used. The Perl equivalent to C's switch statement is given.