Re: search.pl
From: Sherm Pendley (spamtrap_at_dot-app.org)
Date: 04/30/04
- Next message: tadmc_at_augustmail.com: "Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)"
- Previous message: Robin: "another thing"
- Next in thread: GreenLight: "Re: search.pl"
- Maybe reply: GreenLight: "Re: search.pl"
- Maybe reply: David K. Wall: "Re: search.pl"
- Maybe reply: Michele Dondi: "Re: search.pl"
- Maybe reply: Joe Smith: "Re: search.pl"
- Reply: Robin: "Re: search.pl"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Apr 2004 03:13:12 -0400
Robin wrote:
> I have some questions on this , why isn't sub parse and sub search not
> performing the way I want them too, they are supposed to go through all of
> the directories and then open the files in them and then if the contents
> of the file match param ('query') print the results. It's been driving me
> crazy, if someone could point me in the right direction it would be great.
Your script passes the directory to parse(), but it doesn't look like
parse() is using it. So any file that isn't in the current directory ('./')
won't get parsed.
> open (FILE, $filetoparse) or push (@errors, "A file open operation
> failed.");
You should be using more helpful error messages. The above tells you nothing
more than that a file failed to open - it would be better if it also told
you what file and why. Including the file name and $! would make this bug
easier to find.
sherm--
-- Cocoa programming in Perl: http://camelbones.sourceforge.net Hire me! My resume: http://www.dot-app.org
- Next message: tadmc_at_augustmail.com: "Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)"
- Previous message: Robin: "another thing"
- Next in thread: GreenLight: "Re: search.pl"
- Maybe reply: GreenLight: "Re: search.pl"
- Maybe reply: David K. Wall: "Re: search.pl"
- Maybe reply: Michele Dondi: "Re: search.pl"
- Maybe reply: Joe Smith: "Re: search.pl"
- Reply: Robin: "Re: search.pl"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|