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.
In reply to Re: How to execute Perl code on remote machine from a local Perl script and process the output/variables in your local Perl script
by Corion
in thread How to execute Perl code on remote machine from a local Perl script and process the output/variables in your local Perl script
by dushyant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |