how to iterate through a list of files in a directory and compare them to an index.

2008-03-06 Thread Angus Glanville
Hi, I here is a sample of the problem I am trying to solve. I have an index.txt file that contains two values separated by a pipe symbol like this: junk_file_test1|test1.pdf junk_file_test2|test2.pdf I slurp the file in, open a directory handle and try to compare the value

how to take action based on the existence of a value in a hash

2008-01-14 Thread Angus Glanville
Hi, I have a small hash of directory values. When a user inputs a directory value I want to check to see if this directory value is in my hash. If it is not the requested function will be denied. My problem is that when I iterate over the hash I get answers for every key in the hash.