run remote perl script

Hello

i want create perl script to connect remotely to another machine and run perl script

please note that the remote script check for different variables remotely and not located on local machine

also i want to know how to send interactive variables

i am trying to make script to connect remotely and execute other perl script then save the output in local file

any help will be appreciated

thanks

ssh remote_server /path/to/perl/script/foo.pl
ssh remote_server /path/to/perl/script/foo.pl $argument1 $argument2 ...
ssh remote_server /path/to/perl/script/foo.pl $argument1 $argument2 ... >output.log

hello

thanks for your answer

but i guess i didnt explain well

i need to create perl script to connect remotely to another server and run another perl script remotely

regards