Re: readdir unlink any symlinks

2003-07-07 Thread Harry Putnam
Steve Grazzini <[EMAIL PROTECTED]> writes: > Ah, okay. But you'll need to make that into a real loop. > > use File::Spec::Functions; > ... > > foreach (readdir(DIR)) { > my $target = catfile($mnsd, $_); > if (-l $target) { >unlink $target or warn "unli

RE: readdir unlink any symlinks

2003-07-07 Thread Tim Johnson
BSent: Monday, July 07, 2003 12:59 PM (BTo: [EMAIL PROTECTED] (BSubject: readdir unlink any symlinks (B (B (BI'm pretty sure there is a nifty thrifty way to do this rather than (Btying myself in knots like this: (B (BI want to unlink and symlinks that might be in a specific directory. (

Re: readdir unlink any symlinks

2003-07-07 Thread Steve Grazzini
On Mon, Jul 07, 2003 at 12:59:27PM -0700, Harry Putnam wrote: > 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 = "/t

readdir unlink any symlinks

2003-07-07 Thread Harry Putnam
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; $!"; }e