# print @file_names; exit; # This prints out the full array contents when enabled foreach (@file_names){ print $_; exit; # this gives me the error message: Use of uninitialized value in print