Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by taint (Chaplain)
on Apr 26, 2013 at 22:14 UTC ( [id://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;

Replies are listed 'Best First'.
Re^5: File::Find seems grossly inefficient for performing simple file tasks
by Laurent_R (Canon) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1030901]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-03-19 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found