Re: search.pl

From: Sherm Pendley (spamtrap_at_dot-app.org)
Date: 04/30/04


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


Relevant Pages

  • Re: search.pl
    ... > Robin wrote: ... >> performing the way I want them too, they are supposed to go through all ... > parse() is using it. ... > You should be using more helpful error messages. ...
    (comp.lang.perl.misc)
  • Re: search.pl
    ... Robin wrote: ... >> Your script passes the directory to parse, ... >> parse() is using it. ... there to help you find your bugs. ...
    (comp.lang.perl.misc)
  • Re: One of my students playing for the OCGC
    ... Thanks Robin. ... He is playing a lot of ensemble ... He will be performing much more from now on along with some of my ... He speaks several languages ...
    (rec.music.classical.guitar)
  • RE: How can I determine the century of a date in Excel?
    ... You could get the year using the formula YEARand parse out what you need, ... "Robin" wrote: ... > I have to convert a date to a Julian date to import it into JDE OneWorld. ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)