dir.txt = [ dir1.txt, dir2.txt, dir3.txt] use Win32::DirSize; open (FILE, "dir.txt") || die "can not open file\n"; chomp (@file = ); close FILE; #$f = "dir1"; # If I unpound this and pound out the foreach #loop works. foreach $f (@file) { my $Result = dir_size( $f, my $DirInfo, );