eLore has asked for the wisdom of the Perl Monks concerning the following question:
#!/opt/perl5/bin/perl $THISDIR="links/"; opendir THISDIR, "$THISDIR" or die "AACK: $!"; @allfiles = grep !/^\./, readdir THISDIR; # get rid of .* files closedir THISDIR; foreach $link (@allfiles){ $rc=readlink "$THISDIR$link"; !$rc and print "READLINK err: $link\n"; -f $rc or print "File $rc does not exist\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: verifying symbolic links
by no_slogan (Deacon) on Jul 25, 2001 at 03:06 UTC | |
by eLore (Hermit) on Jul 25, 2001 at 17:09 UTC | |
|
(MeowChow) Re: verifying symbolic links
by MeowChow (Vicar) on Jul 25, 2001 at 03:40 UTC | |
by eLore (Hermit) on Jul 25, 2001 at 16:40 UTC | |
|
Re: verifying symbolic links
by merlyn (Sage) on Jul 25, 2001 at 17:52 UTC |