I am working on a perl script which does a document inventory for pdfs in all directories starting from some root directory on our network. The script runs fine locally, but I can't get it to read files from the network drive. i have strawberryperl
this is the beginning of my code
use strict;
use Excel::Writer::XLSX;
use Cwd;
use Tk;
use File::Find;
my @analystreports;
my @directories;
I used the Tk Gui to get a directory
my $homeDir = Tk::MainWindow->new->chooseDirectory;
capture all files and folders in current directory
find(\&grabPDF, $homeDir);
sub grabPDF {
my $file = $_;
if ($file =~ /\.pdf/g) {
push @analystreports, $File::Find::name;
}
}
my network drive looks like this in net use
Local N: Remote \abc-file-01\shared data
Please excuse my beginner code. My question is whether I'm doing something wrong with a network drive or if I have to ask our administrator for privileges. Thanks a ton, Dan