in reply to Re^3: Problem reading files from directory
in thread Problem reading files from directory
Not sure what you're doing in system(2) (the wine call), but why not try the following?
@mp3files = <$INDIR/*.mp3>; $OUTDIR = "./NEWDIR"; foreach my $FILE (@mp3files) { my $tmp= system("wine ......."); move($INFILE,"$OUTDIR/$INFILE"); if ($tmp!=0) { last; } } @mp3files = <$OUTDIR/*.mp3>; foreach my $FILE (@mp3files) { printf "File: %s\n",$FILE; }
Also, there's no such thing as the "move" subroutine. Is it just designed like:
sub move { system "mv $_[0] $_[1]"; # $_[1] = directory + "/" + $_[0] specifi +ed file }
If so you can simply that by just specifying the directory for the second argument.
|
|---|