in reply to Re: Sort of basic search engine/pattern matching problems
in thread Sort of basic search engine/pattern matching problems
Unfortunately, due to the large amount of data I have, I cannot understand if it's working, since it's not printing anything and it seems to take forever to finish.open(HH, "<$PATHDATA/query04.txt"); chomp( my @query_arr = <HH> ); close HH; open(XX, "<$PATHDATA/multisearch_final_sorted_3.txt"); open(DD, ">$PATHDATA/query_results.txt"); my $count=0; while ( my $line = <XX> ) { if ($debug) { print MAGENTA, "LINEA:$line\n"; } for my $query_el (@query_arr) { if ($debug) { print GREEN, "QUERY:$query_el\n"; } if ($line =~ /^$query_el\]\[.*/i) { if ($debug) { print GREEN, "QUERY:$query_el\n"; print MAGENTA, "MATCH:$line\n"; } print DD "QUERY:$query_el\n"; print DD "MATCH:$line\n"; print DD "#################"; $count ++; } } } print DD "Entrate trovate: $count"; close XX; close DD; exit 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sort of basic search engine/pattern matching problems
by graff (Chancellor) on Apr 30, 2010 at 09:42 UTC | |
|
Re^3: Sort of basic search engine/pattern matching problems
by sierpinski (Chaplain) on Apr 30, 2010 at 03:24 UTC | |
by graff (Chancellor) on Apr 30, 2010 at 09:18 UTC |