Your question doesn't make sense at all. I think there are a few things you need to understand first.
1. JavaScript is executed on the client - in the browser after the page has been rendered.
2. Perl is executed on the server to either create a document to send to the client or to accept something submitted from the client (like a form being submitted or a link being clicked).
There is a complete separation between JavaScript and Perl, you can't execute one from the other. You can use Perl to generate JavaScript and send it to the client to be executed...or you can use JavaScript to send an HTTP request to the server to execute Perl and return a reply (HTML, XML, JSON or text) to the JavaScript that sent the HTTP request (this is Ajax which Kevin mentioned).
Again, I've got no idea what you're asking - can you maybe try to re-work your question or post more than just one line of code?
|