in reply to Broken symlinks
Look at perldoc -f readder (and opendir) for the directory traversal (or File::Find, or your favorite way to snarf filenames). Then, for each file you could do something like:
... stuff to get filename .. .. loop through those files.. for my $file (@files) { my $link = readlink($file) || "Fooey"; if ($link ne "Fooey") { if (-e $link) { print "symlink OK, moving on"; }else{ unlink $file; } } }
You get the idea :)
Cheers,
KM
|
|---|