For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > November 2006 > Re: File::Find









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: File::Find
Paul Lalli

2006-11-27, 6:55 pm

Perl wrote:[color=darkred]

Then you shouldn't be using File::Find. The *entire point* of
File::Find is to search through directories recursively. This is like
saying "I'm trying to use this hammer, but it keeps banging the nails
into this piece of would. I want them to be melted down instead."

If you just want the files in the directory, just open the directory
and read it:
perldoc -f opendir
perldoc -f readdir
[color=darkred]

None. This is the most basic of Perl. To "search" just compare the
current file (contained in $_ (or full path in $File::Find::name)) to
whatever you're searching for, using the eq operator. To print, use
print().

Paul Lalli

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com