What's wrong with this script for removing the CVS directories from a checked-out CVS
workspace?

#!/usr/bin/perl
use strict;
use warnings;

my $mypath = '/Users/emac/gcc';

removecvs( $mypath);

sub removecvs {

        my $path = $_[0];
        
system ('/bin/rmdir',"$path/CVS") or die "Can't remove CVS Directory $!";
        
        my $dir;
        
        opendir($dir,$path);
        
        while (defined(my $file = readdir($dir))) {
                next if ( ($file eq '.') or ($file eq '..')) ;
                if (-d "$path/$file") {
                        removecvs("$path/$file");
                }
        }
        
        closedir $dir;
}

any help appreciated.
-------------------------------------
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
[EMAIL PROTECTED]




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to