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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |