Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hi 2teez,

thanks for checking! The positive results you made, made me wondering, why it wouldn't work for me. Starting point of my doubts was, that the matching of array elements worked, if I defined the @ds inside the srcipt. Could there something be wrong with the text file? I created the list of IDs by copying a coloumn out of an excel worksheet into a notepad file. After I created another text file with perl, Kenosis' script worked somehow. However, it printed the Id.numbers of the refering text file, not the matches of the directory scan.

What I want to achieve is:

1.) Look up the Ids given in a text file:

I C 7700

I C 7711

etc..

2. Scan a directory and return all filenames containing the IDS

I C 7700 -A.jpg

I C 7700 -B.jpg

I C 7700 a,b -KK

etc...

And 3. (I haven't mentioned yet) Copy the matched files into another directory

My original script with that text file created by perl did all three steps, but with the last element of the @ds only. Why the other files were not detected and copied, I don't know

Ok. I will turn now to your next answer

better


In reply to Re^6: Looking up elements of an array in another array! by better
in thread Looking up elements of an array in another array! by better

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-16 09:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found