foreach $line (@fich){ $i++; foreach $comm (@com){ if(($line eq $comm)||($line=~/$comm/)){ print"Line $i: $comm"; } } }