Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

evaluating directory path length

by Win (Novice)
on Feb 03, 2010 at 12:47 UTC ( [id://821149]=perlquestion: print w/replies, xml ) Need Help??

Win has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: evaluating directory path length
by marto (Cardinal) on Feb 03, 2010 at 13:48 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: evaluating directory path length
by jdporter (Paladin) on Feb 03, 2010 at 16:42 UTC

    Win, where in the File::Find::Rule documentation do you see an example of the form
    $rule->name(length >= 50);
    ???
    On the other hand, you might try looking (use your browser's 'Find' function, for example) within the File::Find::Rule documentation for the word length, as perhaps there is an example of code which really does something like what you want.

    Why do you find it so hard to read documentation? You should know by now that people cannot read documentation for you.

    What is the sound of Windows? Is it not the sound of a wall upon which people have smashed their heads... all the way through?
Re: evaluating directory path length
by IBlowGoatsSucker (Beadle) on Feb 03, 2010 at 17:07 UTC
    Dear Win, you are being badly treated by the monks here! All you want is that they do your work, this is not so hard, they could look up the online documentation for PERL and it would be done quickly. They would only need to ask you about all the things you don't explain in your questions and they could have a good answer in the time it takes for you to twiddle your thumbs!

    Instead, YOU are told to look up documentation, they call you an idiot and lazy! All of this is true, but it doesn't get your work done. This must be very frustrating. You are obstinate and keep trying, but it is not working so well.

    I suggest something different: tell ME all your problems and I will create solutions for them. You no longer need to worry about monks, I will do it all. It will work like this:
    You go onto the internet and google for things that you like to do. In your search, include the word "job". You will find web pages which let you do what you like and in return they will give you something we modern people call "money". When you have collected enough of this "money", contact me. I will handle your PERL problems and in return you give me the "money" (in our century we call this "paying for work").

    I believe this will work out the best for us all. You no longer need to bother the monks and they do not need to insult you. Your PERL problems will be handled well and quickly and the sheep will like it too! Important: don't look for a "job" that has anything to do with programming. You are not good at it and never will be. That is not your fault, it is the fault of your laziness and bad character.
Re: evaluating directory path length
by ikegami (Patriarch) on Feb 03, 2010 at 16:27 UTC
    You can use ->exec to add custom filters. ->prune would be useful here too.
Re: evaluating directory path length
by Anonymous Monk on Feb 03, 2010 at 15:13 UTC
    I would like to do something similar

    Prove it, try to actually do it yourself

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: evaluating directory path length
by Anonymous Monk on Feb 03, 2010 at 13:07 UTC
    The answer can be found in the File::Find::Rule documentation. Even easier, I've recently written a script which does exactly that and you can copy from it, you can find it here.
Re: evaluating directory path length
by Khen1950fx (Canon) on Feb 03, 2010 at 19:25 UTC
    $rule->name(length >= 50);

    That should be $rule->size(length >= 50) or better yet:

    $rule->exec(sub {length >= 50});
    Here's an example of what I think that you are trying to do:
    #!/usr/bin/perl use strict; use warnings; use File::Find::Rule; open(STDOUT, '>', 'size.txt'); my $rule = File::Find::Rule->new; $rule->file; $rule->name( '*.pm' ); $rule->exec(sub {length >= 25}); my @files = $rule->in( @INC ); foreach my $file(@files){ print $file, "\n"; } exit;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://821149]
Approved by rovf
Front-paged by keszler
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found