Hi there
Ive got the lines :-
$fl_array = preg_grep("/$search/", file('datafile.dat'));
to grab a file & put it into an array -
the value of my $search is created before this command..
What i want is to have search = 'word && {67|98|35}' etc...
So it searches / greps a line of the datafile if it contains
the word "word" AND the number 67, or
the word "word" AND the number 98, or
the word "word" AND the number 35, etc...
so the file contains lines which only contain that word - and any of those 3 numbers...
Is this the correct format ?
Edit :- Ive tried it & my tests are missing a few lines of data which SHOULD match. (re-checked)