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

use strict;
use ExtUtils::testlib;
use Solaris::Procfs qw(:procfiles cwd);
use lib '.';

my $pid;
my @pidlist  = (@ARGV ? @ARGV : getpids());

foreach $pid (@pidlist) {

	my $cwd = cwd($pid);

	unless (defined $cwd) {

		warn "$0: no such process: $pid\n";
		next;
	}

	printf ("%d:\t%s\n", $pid,$cwd);
}