in reply to Re: while or for?
in thread while or for?

Okay. Understood.

> Also you probably mean to use $_ instead of $ARGV

I really meant $ARGV. I wanted to store, in a hash, for each line the names of the files they occure in.