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

use blib;
use strict;
use warnings;

use AFS::FS qw(whereis);

my ($dir, $ip, @hosts);

die "Usage: $0 dir ip\n" if ($#ARGV == -1);

$dir = shift;
$ip  = shift;

@hosts = whereis($dir, $ip);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else {
    foreach my $host (@hosts) {
        print " $host\n";
    }
}