in reply to
Re^2: Looking up elements of an array in another array!
in thread Looking up elements of an array in another array!
kielstirling ++ is right on target, and my apologies for not explaining the [>fileOut] parameter. This designates an optional argument that's used to direct output to a file, instead of the screen. So, for example, you could do the following on the command line:
perl script.pl '/the/dir/to/scan' indexDS.txt >results.txt
Thus, instead of printing to the screen, output's directed to a file. Omitting the last parameter will just print the results to the screen.