On Dec 24, Eric said: >perl -e 'opendir(T,"."); $a = scalar(readdir(T)); print "$a\n";' >.. > >perl -e 'opendir(T,"."); @b = readdir(T) ; $a = scalar(@b); print "$a\n";' >22
readdir() is documented to behave this way. In scalar context, it returns the next entry in the directory; in list context, it returns the remaining entries as a list. >Strange, yet occurrs on all 5.6.1 and 5.005 Versions on All NT and Unix >platforms I can find (SOlaris 8 , Mandrake 8.1 , NT 4.0 , AIX 4.3 , >etc...) Always, *always*, ALWAYS check the documentation before you call something a bug. >Also, Can't seem to find a place to report Generic bugs like this (if it >turned out to be one)? Use the 'perlbug' utility on your computer. The documentation for Perl (which comes with Perl) is on your computer, via the 'perldoc' utility. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]