in reply to perl to run a js script

If you really needed to run the Javascript, you'd need a Javascript engine. However, if all you need is to do what the Javascript does, for just this one page, you could translate the Javascript into Perl. For common hashing algorithms like MD5, there are of course modules on the CPAN that will make the translation rather easier. Typically, the Perl code will end up being much shorter than the Javascript it replaces. This is the approach I would usually recommend, if you are only scripting specific sites and just need to do enough of what their client-side scripts do to get the forms submitted.

If you were trying to create an actual web browser in Perl, or needed to write a general web crawler that would work on most any site, then you'd want to look at using an actual Javascript engine, but that would probably be a larger task.


Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. Why, I've got so much sanity it's driving me crazy.