Run a perl script on Linux from HA BUT they are on different vlans

One possibility would be to get HA to use a shell command to run a shell script, and this script would in turn invoke ssh (Here is a setup guide) to your remote linux machine to run your perl script.

The first thing I would do is try to get ssh setup and running between HA and your remote machine to get your pearl script running, and then try setting up the HA shell command.