#!/usr/athena/bin/perl
# bare-bones program that lists symlinks

chdir shift(@ARGV) || die "$0: Directory isn't here! ($!)\nquitting";

opendir(DIR, ".") || die "$0: Can't open directory ($!)\nquitting";
@dir = sort( grep( !/^\.\.?$/, readdir(DIR) ));

while (@dir) {
    $file = shift(@dir);
    if ($lnk=readlink($file)) {
	printf("%-20s %s\n",$file,$lnk);
    }
}
