#!/usr/bin/perl use MIME::Base64; my @args = map { MIME::Base64::decode($_) } split(",", shift, -1); exec("PROGRAM", @args); die "failed to exec PROGRAM: $!"; ===================================== #!/usr/bin/perl use MIME::Base64; my $str = join(",", map{MIME::Base64::encode($_,'')} @ARGV); system("ssh", 'user@host', 'PROGRAM.remote_access', $str); exit($? >> 8);