witandhumor has asked for the wisdom of the Perl Monks concerning the following question:
#!c:\perl\bin\perl.exe -w use strict; use File::Find; use Carp; #variables my ($directory,$file,$text); print "Enter search text: "; $text = <STDIN>; chomp $text; $directory = 'c:\my_directory'; find (\&search,$directory); sub search { my $file = $File::Find::name; open (FILE, "$file") or carp "Guess what, it didn't work!\n$!"; my $line = <FILE>; close FILE; print "$text - $file" if $line =~ /$text/; }
I have numerous errors that I am trying to work my way through, but the one that I am trying to figure out right now is:
Permission denied at C:/Perl/lib/File/Find.pm line 450
(I am sure there are several other errors the monks can point out as well :-) )
Find.pm is in that folder and I have full access to it. I found this but I don't know enough to figure out if it is truly related or not. I am using PPM 3.0.1 if that helps....
Any help would be greatly appreciated.
Thanks so much!
2006-03-04 Retitled by planetscape, as per Monastery guidelines
Original title: 'Permission Denied'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: 'Permission Denied' error from File::Find
by jdporter (Paladin) on Feb 11, 2004 at 03:47 UTC | |
Re: 'Permission Denied' error from File::Find
by Daruma (Curate) on Feb 11, 2004 at 08:59 UTC | |
by witandhumor (Pilgrim) on Feb 12, 2004 at 03:18 UTC | |
Re: 'Permission Denied' error from File::Find
by NetWallah (Canon) on Feb 11, 2004 at 06:22 UTC | |
Re: 'Permission Denied' error from File::Find
by Roger (Parson) on Feb 11, 2004 at 03:36 UTC | |
by jdporter (Paladin) on Feb 11, 2004 at 03:49 UTC | |
by arden (Curate) on Feb 11, 2004 at 05:53 UTC |