in reply to Re: a "search engine" (ahem)
in thread a "search engine" (ahem)

thanks apl but i cannot clearly understand your third point.... and since this is not my code so i actually cannot understand what $file is used for....

=====================================================
i'am worst at what do best and for this gift i fell blessed...
i found it hard it's hard to find well whatever
NEVERMIND

Replies are listed 'Best First'.
Re^3: a "search engine" (ahem)
by apl (Monsignor) on Jul 09, 2009 at 23:56 UTC
    Assune the find sub is called with $_ equal to SomeFile.html, but that file does not exist. The routine as written simply returns, and the user is left to wonder why nothing was displayed. I'm suggesting that a message be displayed explaining why nothing was displayed.

    The reason I suggested the name of the file be passed in a global variable (e.g. $path) is because $_ is used internally by Perl for a number of reasons. To prevent the path from being clobbered, it should be explicitly stored.