in reply to How to execute Perl code on remote machine from a local Perl script and process the output/variables in your local Perl script

You don't show any code and error messages, so it is hard to suggest any concrete fixes to your script.

I recommend to write a Perl script that runs on the machine B, and copy that to the machine B and start that through SSH.

You could make the script B output JSON (or JSON::Tiny) to transfer the resulting data back in a convenient way.

  • Comment on Re: How to execute Perl code on remote machine from a local Perl script and process the output/variables in your local Perl script