I'm pretty sure there is a nifty thrifty way to do this rather than
tying myself in knots like this:

I want to unlink and symlinks that might be in a specific directory.
A snipped from hack-a-thonic script:

my $mnsd = "/tmp/mns";
if(! -d $mnsd){
     mkdir $mnsd or die "Can't mkdir $mnsd; $!";
}else{
   opendir(DIR, $mnsd) or die "can’t opendir DIR: $!";
   { my $target = $mnsd . "/" . $_;
   unlink $target if (-l $target)} readdir(DIR);

}
close(DIR);

Error this formulation gives is:
Use of uninitialized value in concatenation (.) or string at
/cvsb/reader/home/reader/scripts/perl/sym.pl line 22.

Its not $mnsd so wondering what.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to