in reply to Help me please for milw0rm.com downloader

I have a problem when it comes to comparing the titles in the array if they already exist with the file which contains the description.

Whenever you think "already exist", think "hash". Replace your array with a hash, and look at exists.

I didn't look closer at your code, because it's really long and I'm not interested in wading through long code, where most of the lines have no bearing to the problem. You haven't shown any effort to reduce the problem to the minimal lines necessary. Most likely, the minimal problem would look like:

use strict; #open (CH, "</opt/lampp/htdocs/parser/test/exploit_description.txt"); my @check = <DATA>; #close CH; my @unique_milw0rm = (); my @milw0rm_title; for (my $i;$i<=$#milw0rm_title;$i++) { $seen = 0; for (my $j;$j<=$#check;$j++) { if ($milw0rm_title[$i] =~ /$check[$j]/) { $seen = 1; next; } }; if ($seen == 0) { push @unique_milw0rm, $milw0rm_title[$i]}; }; __DATA__ some milw0rm data more milw0rm data

Then, I would have spotted the two problems in the code right away, and likely you would have too. First, use a hash for the titles to check for the existence. Second, you are reading in the titles with newlines at the end, but likely you're comparing them to other data that doesn't have newlines at the end. Check that by printing the two items:

print "First entry of check array: >$check[0]<\n";

Then, you want to read on chomp.