http://qs321.pair.com?node_id=328125

witandhumor has asked for the wisdom of the Perl Monks concerning the following question:

I am very new to Perl and need your help.

#!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'