in reply to Event programming

I would suggest that you write some more text about what you what to do and how you envision this happening.
Give an example.

I am not sure what you mean by "an event on a Web page".

Perl can act like a simple user who receives a web page and responds with whatever fields need to to be filled in and sends a reply.

There are complications with Java Script and in that case, Perl cannot execute the code.
You can however control a browser which can run the Java code.

I don't know enough info right now to guide further.