#!/usr/bin/perl use strict; use warnings; use POSIX; use Filesys::SmbClient; my $smb = new Filesys::SmbClient(username => "Hubert"); my $fd = $smb->opendir("smb://bioboss/shared/Hubert/Blast"); my @thefiles = $smb->readdir($fd); close($fd); #foreach(@thefiles) { # #} my $file; my @raw_data; my $count; my @array; print "Start entering foreach.....\n"; foreach $file (@thefiles) { #print $file; open (DAT, $file) || die ("Could not open file"); @raw_data = ; foreach my $wrestler (@raw_data) { #print "Hallo",@raw_data; #print "opening example\n"; open (bigShot, ">>hello_Jesus.txt") || die ("Could not open file. $!"); print bigShot ($wrestler); close (bigShot); } print "finished\n"; $count++; } print "finished reading all Files.....closing Directory\n"; print $count;