#!/usr/bin/perl print STDERR "PID: $$\n"; exec @ARGV; #### $ ssh my.host.com tellpid echo 'hello world' PID: 15079 hello world