SPUG: Win32 Sorting directory by date

Mark Yocom myocom at microsoft.com
Wed Oct 3 12:15:25 CDT 2001


Oh, and one other thing I overlooked: closedir(DIR) should be used
instead of close(DIR). :-)

> -----Original Message-----
> From: Bryan Dees [mailto:Bryan.Dees at airborne.com] 
> Sent: Wednesday, October 03, 2001 9:49 AM
> To: Spug-List (E-mail)
> Subject: RE: RE: SPUG: Win32 Sorting directory by date
> 
> 
> Thanks for the followup's everyone. Your solutions work 
> perfectly under
> Unix. 
> However, the provided solution doesn't sort files under Microsoft's
> 'challenged' NT OS:
> 
>     opendir(DIR, ".");
>        @FILES = sort { -M $a <=> -M $b } readdir(DIR);
>        print "The files you requested:\n". join("\n", 
> @AllFiles2) ."\n";
>     close(DIR);
> 
> 
> Thank you for your continued support.
> 
> Bryan Dees
> Distributed Systems Analyst
> Airborne Express
> bryan.dees at airborne.com
> 
> 
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> - - - - - - -
>      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
>       Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
>   Replace ACTION by subscribe or unsubscribe, EMAIL by your 
> Email-address
>  For daily traffic, use spug-list for LIST ;  for weekly, 
> spug-list-digest
>      Seattle Perl Users Group (SPUG) Home Page: 
http://zipcon.net/spug/



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/





More information about the spug-list mailing list