in reply to Help with for loop

is simple, files are iterators, once you read the whole file, this part of your code  <NB_FILE> you're at the very end of the filehandle, there is no more file left to read

see Re: Efficient matching with accompanying data (tree)/Efficient matching with accompanying data

see Re: Looking up elements of an array in another array!/Looking up elements of an array in another array!

see Re: Single regex/Single regex

see [id://]/[id://]