I am rather new to Perl and translating some bash scripts to parse Apache logs from several remote production servers into a more useful format for processing on a local mac
Net::SSH
is ssh
executable wrapper, and there are better solutions for perl nowadays.
http://search.cpan.org/~remi/Net-SSH2-Simple/lib/Net/SSH2/Simple.pm#SYNOPSIS
my ($stdout,$stderr, $exitcode) = $ssh2->cmd("perl -e $crawler")
or die $ssh2->error;
If you're not passing arguments to the script, it should be as simple as
ssh "user@host" perl < $crawler
If you want to pass command line args, just use a "-" placeholder to get the same affect as the bash -s, i.e.
ssh "user@host" 'perl - arg1 arg2' < $crawler