View Single Post
Old 11-16-2002, 10:31 PM  
some_idiot
Confirmed User
 
Join Date: May 2002
Location: Doesn't matter, I'm not buying you another pint!
Posts: 1,511
What something like....


$VARIABLE1 = "SOMETEST";
open (WORDLIST, "wordlist.txt");
@RAWWORDS= &lt WORDLIST&gt ;
close (WORDLIST);

foreach $LINE (@RAWWORDS) {
chop $LINE;
if ($LINE = $VARIABLE1) {
print "Match with $LINE \n";
}
}

F'ing display parser on the board! Take the spacing
out on the less than symbol on the 3rd line where we dump
the contents of a file into the array.

500 lines for an array isn't bad, don't do this method
for 10000+ lines unless you've got some time to waste.

I'm tired and I've fought with the parser, milage may
vary! This should be what you want for a quick and
dirty. If it doesn't work check the web from here.


Cheers!
some_idiot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote