in reply to glob is working only first time in foreach loop

this is no valid code, variables like files_list or i need sigils in Perl, i.e. @ and $

Please start always using

use strict; use warnings;
for your code.

Posting code which isn't checked this way won't help you here.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!