in reply to Having trouble with pperl (Persistent Perl) and CGI

Just a shot in the dark... but have you tried it without using Switch?
if ($function eq 'one') { ... } elsif ($function eq 'two') { ... }