-----Original Message-----
From: Porter, Chris
Sent: Thursday, May 17, 2001 6:59 AM
To: '[EMAIL PROTECTED]'
Subject: RE: FW: delete files
Thanks, helps very much. The directory -- I added the directory I'm
referring to.
opendir DIR - added the same directory(????)
Can u break this code down for me, sorry being such a newbie newbie
newbie!!!!
Muchas gracious
Chris
-----Original Message-----
From: Paul [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001 11:05 AM
To: Porter, Chris; [EMAIL PROTECTED]
Subject: RE: FW: delete files
--- "Porter, Chris" <[EMAIL PROTECTED]> wrote:
> Silly question --- where do i exactly insert all of my information
> that points to where my changes need to be made. Sorry if this is a
> stupid question. Thank you.
If you don't know, it would be sillier not to ask. =o)
chdir "/the/directory" or die $!; # <<=== edited
> opendir DIR, "." or die $!;
> for my $file (grep { -f $_ } readdir DIR) { # maybe -c?....
> unlink $file if $file =~ /^[A-Z]+$/
> }
> closedir DIR;
The previous version assumed you had done something like:
my $dir = "/the/directory";
Does that help?
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/