I've found. I have to put the absolute path.
Is there a way without absolute path ?
Franck
-----Message d'origine-----
De : COLLINEAU Franck FTRD/DMI
[mailto:[EMAIL PROTECTED]]
Envoy� : mardi 22 janvier 2002 08:15
� : [EMAIL PROTECTED]
Objet : -d test file
Greetings,
I have the following code:
#!/usr/bin/perl -w
$chemin="/home/collineau/tests";
opendir (DIR,"$chemin") || die " impossible d'ouvrir le r�pertoire $chemin
$!";
while ($rep=readdir DIR)
{
print "$rep\n";
$a =-d $rep;
print "$a\n";
}
The output is:
..
1
...
1
Techmedia Broadband home
Startech
Techmedia Broadband home and Startech are directories.
Why $a doesn't return 1 ?
Regards,
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
