user1092042
user1092042

Reputation: 1295

Calling a Perl script from JavaScript

I am developing a Firefox addon and I have a Perl script which I am using to perform a specific task. This Perl script needs to be called from the addon. What would be the best way to implement this? I was thinking of creating a socket program in perl (on my server) to listen for an incoming connection (from my addon) and then calling my required Perl script. But then how would I call this Perl script from the JavaScript in the Firefox addon? Also, is there any better way of achieving this?

Upvotes: 0

Views: 955

Answers (1)

Mat
Mat

Reputation: 206747

The typical way to do this is to set up a proper web server with Perl CGI support, and use JavaScript and Ajax on the client side to call into your script.

There are plenty of resources online for both of these technologies.

Upvotes: 1

Related Questions