in reply to Re^2: error message txtFile comparison with output in another txtfile
in thread error message txtFile comparison with output in another txtfile

and now that the "compile" errors are fixed you should state your new problem: what do you expect to see and what do you actually see.

For test purposes it would be better to print to STDOUT rather than to a file.


Perl is Huffman encoded by design.
  • Comment on Re^3: error message txtFile comparison with output in another txtfile

Replies are listed 'Best First'.
Re^4: error message txtFile comparison with output in another txtfile
by juergenkemeter (Novice) on Jul 14, 2005 at 23:27 UTC
    well the code should take the search strings from 'search.txt' (here: 'Juergen'), take this string and compare it to all entries in 'general.txt'. Since one of the entries in 'general.txt' is a matching string, the output should be written into an output text file.

      In a word: chomp. Also, I think you really want to search general.txt for the match text (one per line) from search.txt, so the for loop becomes something like:

      for $a (@sea) { chomp $a; @result = grep /\Q$a\E/, @gen; push (@final , @result); }

      Perl is Huffman encoded by design.
        works fine. :)