Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^6: Looking up elements of an array in another array!

by better (Acolyte)
on Mar 15, 2013 at 21:34 UTC ( #1023782=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Looking up elements of an array in another array!
in thread Looking up elements of an array in another array!

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


Comment on Re^6: Looking up elements of an array in another array!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-07-29 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls