echo dev
Sat, 22 Feb 2003 22:06:27 -0800
Thanks hde
sub code_base_conf
{
my @file_contents;
my $start_dir = shift;
my @dir_contents;
my $cwd = $start_dir;
my $old_cwd; open (CONFIG_FILE, ">/home/hde/code_serv.conf")
or die "Can't create config file : $!\n"; chdir ($start_dir) or
die "Can't cd to $start_dir : $!\n"; opendir (DIR, $start_dir)
or die "Can't open $start_dir : $!\n"; @dir_contents = readdir (DIR)
or die "Can't read dir $start_dir : $!\n"; closedir (DIR) or
die "Can't close dir $start_dir : $!\n"; for my $file_or_dir (@dir_contents)
{
next if ($file_or_dir eq qq{.});
next if ($file_or_dir eq qq{..}); if (-d $file_or_dir) # If the file is a directory.
{
next if (-l $file_or_dir); $cwd = &cwd;
$old_cwd = $cwd;
$cwd =~ s{(/.*/)+}{}g; printf ("%s %s %s\n", $cwd, "=>", $old_cwd);
$cwd = &cwd; chdir (qq{$cwd/$file_or_dir}) or
die "Can't cd to $cwd/$file_or_dir : $!\n"; opendir (DIR, qq{$cwd/$file_or_dir}) or
die "Can't open dir $file_or_dir : $!\n"; chdir ($cwd) or
die "Can't cd to $cwd : $!\n"; next;
} }
chdir ("/home/hde/code_base/perl/code_base_Backup");
#clean_conf ("./code_serv.conf");
}-- For information on unsubscribing from this list, please visit http://rochester.pm.org