Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^6: Pattern Matching in Arrays

by aj.kohler (Initiate)
on May 13, 2009 at 18:28 UTC ( [id://763868]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Pattern Matching in Arrays
in thread Pattern Matching in Arrays

Let me try explaining the overall goal of the program:

  1. Read in directory of file names

    1. Most file names hava a Root number, Revision, Extension of pdf: 12345_-v1.pdf
    2. Most names have an underscore as the seperator between Root Number and Revision: 3873215a_-v1.pdf
    3. Many names have more than 1 underscore used as text seperators: 21586_rework_bore_tool_-v2.pdf
    4. Some names have no underscores in them: 4148-t-2.pdf
  2. I need to display only the latest revision of the file, so if the following exist in the directory:
    21586_rework_bore_tool_-v1.pdf
    21586_rework_bore_tool_-v2.pdf

    Only display 21586_rework_bore_tool_-v2.pdf
  3. I am unable to capture all of the combinations listed above...

I appreciate all recommendations...

AJ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2026-01-23 16:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (125 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.