we looked at a few differences between shell and Perl:
#!/usr/bin/perl -w use strict; use File::Find; use Getopt::Long; my %OPTIONS; GetOptions(\%OPTIONS, "dir=s", ); die "Must give --dir" unless exists $OPTIONS{dir}; # # to allow mutliple directories: test.pl --dir=/home/manu --dir=/home/jasons ... # my @files; if (ref $OPTIONS{dir}) { @files = @{ $OPTIONS{dir} }; } else { @files = $OPTIONS{dir}; } find(\&wanted, @files); sub wanted { -l && !-e && print "bogus link: $File::Find::name\n"; } |