Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: File::Find seems grossly inefficient for performing simple file tasks

by taint (Chaplain)
on Apr 26, 2013 at 22:14 UTC ( #1030901=note: print w/ replies, xml ) Need Help??


in reply to Re^3: File::Find seems grossly inefficient for performing simple file tasks
in thread File::Find seems grossly inefficient for performing simple file tasks

Greetings Laurent_R,
The "find" in this case, has nothing to do with finding something within a file. But rather, is an attempt to find files themselves. :)
It is a search, that attempts to find all files within a certain range; in this case, over a certain age. Hence, all the chatter about ctime, atime, etc...
Hope this clears things up, a bit. :)

Best wishes.

--chris

#!/usr/bin/perl -Tw
use perl::always;
my $perl_version = "5.12.4";
print $perl_version;


Comment on Re^4: File::Find seems grossly inefficient for performing simple file tasks
Re^5: File::Find seems grossly inefficient for performing simple file tasks
by Laurent_R (Parson) on Apr 27, 2013 at 10:37 UTC

    Hi Chris,

    I guess that I probably was not clear enough to explain what I meant. I know what the find command is doing and I know that it has very little (if anything) to do with grep. My point was something else.

    I just meant to give another completely different example to show that it does not make too much sense to compare the programming efficiency (in terms, for example, of the quantity of code needed for a specific task) of a shell or built-in Unix command and the coding of the same actions in a Perl program. Because to make the comparison fair, you would need to know the quantity of code that is used behind the scene (e.g. the source code of the find command) when you run a find command. I used a very simple grep example just to make the case more obvious.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1030901]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2014-09-22 09:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (186 votes), past polls