If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Searching files FILEHANDLES

Hi can some one please assist. I have written a small script that prompts a user to enter various details about themselves from there name to their gender, DOB etc. The first question asks them to enter a 4 digit reference number, along with the other data that is saved to a file called CustData.txt.

This works fine however I wish the script to test CustData.txt for existing reference numbers if entered and to print the details to screen if it does exist.

I have an idea of what functions to use File handles and Pattern Matching etc but I have never had any experience on how to check a file and print only desired information form it. The start of the script is below and an example of how I am asking for the data.