in reply to Re: reading from a file and splittingin thread reading from a file and splitting
open (file, "<file.txt"); @file = <file>; close (file); foreach $line(@file){ ($var1, $var2) = split(/\=\=/, $line); if($chat =~ /\b$var1\b/i){ #the item i was looking for print "$var2"; } [download]