We need some more information. What is the match condition and how do u find the number of matches?
If ur just trying to record the number of "something" per line so that u can go back and correlate the number to the line, then u can't use foreach. U have to iterate over the array so u can get the offset. for $i (0 .. $#data) { $number = 0 + do_something; $matchcount[$i] = $number; } Now $matchcount[$i] corresponds to the number of matches in $data[$i]. -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 00000100 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs