in reply to Re: Problem reading files from directory
in thread Problem reading files from directory
Now, when i press ctrl+c when wine is running, it jumps out of the 1st foreach. But at least one of the files has already been moved. When printing in the second foreach, it prints ALL files that were there, even the one that's been moved.opendir(DIR, $INDIR) @mp3files = <*.mp3>; $OUTDIR = "./NEWDIR"; foreach my $FILE (@mp3files) { my $tmp= system("wine ......."); move($INFILE,"$OUTDIR/$INFILE"); if ($tmp!=0) { last; } } foreach my $FILE (@mp3files) { printf "File: %s\n",$FILE; } closedir(DIR);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Problem reading files from directory
by shigetsu (Hermit) on Jul 20, 2007 at 19:38 UTC | |
by yaneurabeya (Novice) on Jul 20, 2007 at 20:07 UTC | |
by zoryn (Initiate) on Jul 20, 2007 at 21:05 UTC |