skip to main | skip to sidebar

Perl note

Friday, January 4, 2008

Finding oldest file in directory

my $xml_file = (reverse sort{(stat $a)[10] cmp (stat $b)[10]} glob "$dir_name/*.*")[0];
Posted by raj at 3:12 AM
Labels: Finding oldest file in directory

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2008 (12)
    • ▼  January (12)
      • The Subroutine Stack
      • How to Use the Windiff.exe Utility
      • Row and Array Comparisons in postgresql
      • Array Functions
      • Printing an Associative Array
      • Checking the Existence of an Element
      • How to Create a Bullet List in Microsoft Excel
      • installing module
      • isArray() in Perl
      • ordering hash
      • delete duplicate hash value's
      • Finding oldest file in directory
  • ►  2007 (84)
    • ►  December (22)
    • ►  November (6)
    • ►  October (9)
    • ►  September (1)
    • ►  August (41)
    • ►  July (5)

About Me

raj
View my complete profile