if($> == 0) { # exec { "/path-to-wrapper-program" } # ( "/path-to-wrapper-program",$0,@ARGV); exec { "$0" } #<<<<<<<<<<