ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-users
perl-win32-users
Re: -x file tests not working
by $Bill Luebkert other posts by this author
Jul 31 2004 3:34AM messages near this date
view in the new Beta List Site
-x file tests not working | Re: Perl 5.6 vs 5.8
Jeremy A wrote:

>  hi all
>  
>  I cannot do a test on a file to see if it is a directory or not. It seems 
>  to recognize a directory/folder as a file. the only directories it detects 
>  are "." and ".." links.
>  
>  I am running Perl v5.8.4,  build 810 on win2000 Pro svc pack 4
>  
>  
>  opendir(BACKP,"Records");
>  my @m = readdir(BACKP);
>  
>  foreach my $f (@m)
>  {
>  	if (-d $f)

        if (-d "Records/$f")

>  	{
>  		print "<<$f\n";	
>  		
>  	}else
>  	{
>  		print "?$f\n";
>  	}
>  
>  }
>  
>  closedir(BACKP);


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:dbecoll@[...].net
 (_/   /  )    // //       DBE Collectibles    Mailto:dbe@[...].com
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Jeremy A
$Bill Luebkert

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved