SPUG: Win32 Sorting directory by date

Bryan Dees Bryan.Dees at airborne.com
Wed Oct 3 11:48:58 CDT 2001


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/





More information about the spug-list mailing list