Hello Chris,

Tuesday, June 26, 2001, Porter, Chris <[EMAIL PROTECTED]> wrote:

PC> Hi, was hoping someone could help.
PC> I want to remove some directories:
PC> .Any help would be greatly appreciated.
PC> Basically, I want to remove all directories with Capital letters in this
PC> directory.  Make sense.
PC> Here is my script, looks like it's working but it's not removing all the
PC> directories
PC> opendir(HERE, '.');

PC>  @AllFiles = readdir(HERE);

PC>  foreach $Name (@AllFiles) {

PC>    if (-f $Name) {next}

PC>    if ((-d $Name) and ($Name =~ /^[A-Z]+$/)) {rmdir '$Name'}

change
 rmdir '$Name'
to
 rmdir "$Name"
or to
 rmdir $Name

' and " is very different in perl.


Best wishes,
 Maxim                            mailto:[EMAIL PROTECTED]


Reply via email to