in reply to Not looping... Am I a moron?

Based on other replies, my guess is that since get_section() is working directly on @_, some other code is clobbering the values in the "variables" that you passed to get_section().

Change the top of the function to:

my @files= @_; for( @file ) {
and see if that fixes things.

        - tye (but my friends call me "Tye")