in reply to switch and case statement using a function

You need to actually declare function test_func, which in Perl you do with the sub keyword:
sub test_func { print "hello\n"; }

See perlfunc and perlsyn for details.

Oh, and please don't use Switch;, it can go horribly wrong, and is deprecated in favor of given/when, which are available starting from perl 5.10.0 (current old-old release).