At 9:54 am +0200 30/4/02, Barbara Manfredini wrote: | I need to find every line in a file where compare a name of a different big | list(in another file).I need every line in a new file.
#perl -w open F, "france" or die $!; chomp (@nom = <F>); #list names open F, "/etc/passwd" or die $!; @pas = <F>; #list passwd lines open F, ">temp.txt"; #create file for results for $n (@nom) { #loop through the names for (@pas) {/^$n:/ and print F }} #loop writing matching lines to temp.txt #View contents of temp.txt:- open F, "temp.txt"; print "$/$/"; print <F>; JD