The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/perl -w

use strict;

my $proc;
if( $^O =~ /linux/i ) {
    $proc = "/proc/$$/exe";
} else {
    $proc = "/proc/$$/file";
}

print "0 = $0\n";
$ENV{PAR_PROGNAME} ||= '';
print "PAR_PROGNAME = $ENV{PAR_PROGNAME}\n";
$ENV{PAR_TEMP} ||= '';
print "PAR_TEMP = $ENV{PAR_TEMP}\n";
if( $proc && $^O ne 'freebsd') { # /proc/$$/file is unreliable on FreeBSD
    print "exec = ", readlink( $proc  ), "\n";
}