1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use strict; use warnings; use 5.010; use File::Basename; my $input_dir = '/data/input/'; my $transfer_dir = '/data/transfer/'; my %nicht_transferiert; for my $f ( glob "$input_dir/*" ) { my $fn = fileparse( $f ); $nicht_transferiert{$fn} = 1; } for my $f ( glob "$transfer_dir/*" ) { my $fn = fileparse( $f ); $nicht_transferiert{$fn} = 0; } my @zu_transferierende_dateien = grep { $nicht_transferiert{$_} == 1 } sort keys %nicht_transferiert;