Hi,
I need to search 3 different servers and list the output of the directories to a specific file for each server. I understand how declare the constant(s) but unsure of how to iterate through all of the constants and list the file output. Any ideas would be helpful.
Perlnewbe
#!/usr/local/bin/perl
use strict;
use warnings;
use IO::File;
use File::Find;
use constant Dir1 => "//servvername/dir/";
use constant Dir2 => "//servername/dir/";
use constant Dir3 => "//servername/dir/";
open (DEST, '>c:/servername.txt') or die "Unable to open the destination file";
find (\&process_file, $constant;
sub process_file {
print $File::Find::name, -d && "/", "\n";
print DEST $File::Find::name, -d && "/", "\n",;
}
close (DEST)