in reply to Run Perl function using href

Yes, its possible, use CGI

See Tutorials: Web Programming: CGI Programming
CGI Programming 101
Ovid's CGI Course
Setting up Perl/CGI with Windows

no webserver(apache)? no problem! test .cgi with Plack/plackup