boby_drack has asked for the wisdom of the Perl Monks concerning the following question:
i want manipulate files but in first time i want catch
them in a list for treat them after..
my code is:
but for example i place a file "hello.exe" in@listDir = readdir(ORIG); if (!@listDir) { die("there no files !") ; } foreach $i (@listDir) { if ( -f $i) { print "$i is a file !"; push(@filesInDir,$i); } else {print "$i isn't a file !\n"; } }
And miracle(it's a joke sure !) the program print$i = 'C:/test/hello.exe' ; if ( -f $i) { print "$i is a file !"; push(@filesInDir,$i); } else {print "$i isn't a file !\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: file's treatment
by Corion (Patriarch) on Apr 11, 2004 at 18:05 UTC | |
|
Re: file's treatment
by matija (Priest) on Apr 11, 2004 at 18:08 UTC | |
|
Re: file's treatment
by runrig (Abbot) on Apr 11, 2004 at 18:09 UTC | |
|
Re: file's treatment
by tilly (Archbishop) on Apr 11, 2004 at 19:58 UTC | |
|
Re: file's treatment
by graff (Chancellor) on Apr 11, 2004 at 20:49 UTC |