Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9277869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:13:03+00:00 2026-06-18T17:13:03+00:00

I am using perl to find some kml files in a directory. The files

  • 0

I am using perl to find some kml files in a directory. The files are located in
/Data/######/.
Where ###### is a 6 digit number.
All of the kmls are the same 6 digit number of whatever folder it was in …
/Data/######/######_REP.kml

The problem is I have another folder
/Data/QC/######/
with the same kmls in it as well. I want to ignore anything thats in that QC folder from my search.

My Code:

    sub repmatch{
    Push(@filelist,$File::Find::name) if ($File::Find::name =~ m\d{6}\/\d{6}_REP.kml$/)
    }

    find(\&repmatch,$dir) # $dir is my directory I passed in
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T17:13:04+00:00Added an answer on June 18, 2026 at 5:13 pm

    in the repmatch subroutine, add (before push):

    if ( $_ eq 'QC' ) {
        $File::Find::prune = 1;
        return;
    }
    

    That should solve it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Perl we usually do a recursive directory traversal using File::Find and we often
I am using perl to address some text files. I want to use perl
My task is to extract some data from a given document using Perl-style (or
How can I find extended ASCII characters in a file using Perl? Can anyone
If I want to find a keyword in a sentence using Perl I have
Possible Duplicate: Comparing Two Arrays Using Perl I am trying to find elements that
I am writing a Perl script (in Windows) that is using File::Find to index
I've been using perl, MongoDB, and GridFS for some pet development, and wonder -
How do I find out which version of Java I am using Perl programming
I am trying to write a regex using perl but I need some help.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.