What happened to my program ? is it wrong ? As your information, I want to print out all the files in the specific directory.
But, after i test it the program did not print it correctly, All the files have been printed twice. As example :-
Could somebody tell me what wrong with my program ?TEST: EMSSIN_SR10_20061011115435.txt TEST: EMSSIN_VOIP_20061011115435.txt TEST: EMSSIN_SR10_20061011115435.txt TEST: EMSSIN_VOIP_20061011115435.txt
sub splitInputFile { my $cnt = shift; my $mscname = $swname[$cnt]; my $ftype = $outftype[$cnt]; my $ext = $outfext[$cnt]; my $indir = $inputdir[$cnt]; my $outdir = $outputdir[$cnt]; my $arcdir = $archivedir[$cnt]; if ( -d "$indir") { opendir(INDATA,$indir); while (my $indata = readdir(INDATA)) { next if $indata !~ /EMSSIN/; print "TEST: $indata\n"; } closedir(INDATA); } else { print "ERROR! $indir not found\n"; } }
In reply to READDIR: files printed twice in the directory ? by bh_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |