If you want to search line by line, use this: while( <CSVFILE> ) { if( /searchword/ ) { # redirect to url } }
# redirect to OTHER url This will go through the file, line by line and check for the word. If found you will need to add code to go to the URL you want. Other wise after it is done reading the file and the word is not found, it will go to the other URL. You may also want to check out the beginners-cgi mailing list. -----Original Message----- From: Matthew Harrison [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: my first regex i think if i have a file delimited by commas and i want to make a script that will search to see if a word, passed in a query string, is in the file, and redirect to one url if i does and one if it doesn't (both urls are also passed via query strings) thanks in advance -- Matthew Harrison Internet/Network Services Administrator Peanut-Butter Cheesecake Hosting Services Genstate www.peanutbuttercheesecake.co.uk -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]