skip path prune

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

How do you use the prune function to skip a printing all of the
contents of a folder?  It will not print folder 3 but does print the
contents of folder 3 which I do not want printed.

use CGI ':standard';
use CGI::Carp  'fatalsToBrowser';
#use strict;
use warnings;
use File::Find;
my $file_count = 0;
my $dir_count = 0;

$title = "Find Files";
print header,

find ( {
  wanted => \&wanted}, 'C:/Documents and

printf "\nThere are %d files in %d directories.\n",

sub wanted {

        if (-d) {

        print $File::Find::name, "\n" unless -d =~ /^folder3/;


  elsif (-f _) {
    print "  <TR> <TD ALIGN=RIGHT>File name is


Re: skip path prune wrote:
Quoted text here. Click to load it

You have posted the same message (at least) three different times to
(at least) three different newsgroups.  This is called "Multiposting"
and is extremely rude.  I have answered you in perl.beginners, and
someone else answered you in comp.lang.perl.misc.  If I had realized
you multiposted in the first place, I probably wouldn't have replied at

In the future, if you really *need* to post to many different groups,
please *crosspost* as I am doing here.  That is, send one message to
multiple groups, rather than sending multiple copies of a single
message to multiple groups.

Paul Lalli

Re: skip path prune

Quoted text here. Click to load it

Man, whenever *I* try that (crossposting), do I get flamed!

Like it's some religious principle, "Thou shalt never crosspost".

I always thought crossposting was really useful, by
enabling members of several newsgroups to communicate
amongst each other on a given topic.

Especially when the groups are somewhat unrelated, perhaps
perl and php and lisp, or engineering and physics.

Broadens the scope of idea-sources.


Re: skip path prune

[advice against multi-posting snipped]

Quoted text here. Click to load it

You were advised against 'multi-posting', not 'cross-posting'. Do you
know the difference?

Quoted text here. Click to load it

No, most Usenauts would say 'Thou shalt never multi-post'.

Quoted text here. Click to load it

Yes, cross-posting can be useful in limited circumstances. Did anyone
tell you otherwise?

Quoted text here. Click to load it

Please make sure you know the difference between multi-posting and
cross-posting, and why one is bad and the other is OK. OK?

 Posted Via Premium Usenet Newsgroup Services

Re: skip path prune

Quoted text here. Click to load it

Quoted text here. Click to load it

FYI, I am pretty sure David's post a humor piece.

(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:

Re: skip path prune

Quoted text here. Click to load it

Apologies to David from the humor-impaired.

Re: skip path prune

Quoted text here. Click to load it

Nope, not a joke.

At my ISP ( (in NYC)), I and a whole huge bunch
of people use "shell accounts", actually old-time "timesharing",
like on a dec-20 or vax or the like.

You log in, and you're sitting at a bash prompt (I switch
to tcsh), just like at home.

Plus, you're connected to the net, via eg lynx, mutt, trn4, etc.

Anyway, they have this local newsgroup, panix.questions, with
(like here) all these super-smart people on it.

I s**t you not, this bunch of people HATE cross-posting,
and if they ever got physical access to someone who
did it, they'd tie him/her to the stake and set it afire.

You say to them "well, isn't it useful *sometimes* (rarely)",
well, it'd be like asking Cheney "yeah, but shouldn't
we be asking if it was anything we (USA) did that
made them so angry?"!


Site Timeline