CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: File::Find error message at runtime: Edit Log



adaykin
Novice

Jul 17, 2007, 11:49 AM


Views: 834
File::Find error message at runtime

I tried running my script and the command line gave me back this error at runtime. Invalid top directory at C:/perl/lib/file/find.pm at line 592. I use the module File::Find so I can process the directories recursively. Here is where I am going through the directories in my code:

Code
sub process_file  
{
# Search for all the TC's
my @files = grep {/^\d{3}/} readdir BIN;
close BIN;
# Go in and edit out the GUID field
foreach my $file(@files)
{
open(FILE, $guidFile) or die "$!";
readline FILE until eof FILE or $guidFile =~ /^GUID$/;
if($guidFile =~ /^GUID$/)
{
print "GUID Found";
}
}
}
find(\&process_file, @DIRLIST);


Not sure what to do about this error. I am on windows xp. To test I have been hard coding a directory in that has several files in it, and has a few directories beneath and on top of it.
------------------------------------------------------------

New Horizon Designs <-- My site, just updated the GUI to a PHP Nuke interface


(This post was edited by adaykin on Jul 20, 2007, 1:08 PM)


Edit Log:
Post edited by adaykin (Novice) on Jul 20, 2007, 1:08 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives