madM has asked for the wisdom of the Perl Monks concerning the following question:
my @folder=(); opendir (DIR,"/Users/Maxi/Desktop/Verzeichnis\ beispiel") or die " the + directory couldn´t be opened\n"; while (@folder = readdir(DIR)){ last; } foreach my $file (@folder){ open( FIL ,'<', $file) or die "the file $file couldn´t be opened: +$!\n"; #### here something else to do with each file#### }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: working with directories
by choroba (Cardinal) on Sep 12, 2013 at 11:58 UTC | |
by madM (Beadle) on Sep 12, 2013 at 13:57 UTC | |
by choroba (Cardinal) on Sep 13, 2013 at 07:23 UTC | |
by madM (Beadle) on Sep 14, 2013 at 11:27 UTC | |
by choroba (Cardinal) on Sep 14, 2013 at 16:23 UTC | |
|
Re: working with directories
by tobyink (Canon) on Sep 12, 2013 at 12:03 UTC | |
|
Re: working with directories
by Laurent_R (Canon) on Sep 12, 2013 at 11:59 UTC | |
|
Re: working with directories
by Anonymous Monk on Sep 12, 2013 at 12:19 UTC | |
|
Re: working with directories
by uday_sagar (Scribe) on Sep 13, 2013 at 05:26 UTC | |
|
Re: working with directories
by zork42 (Monk) on Sep 13, 2013 at 04:49 UTC |