Help for this page

Select Code to Download


  1. or download this
    use List::Util qw(reduce);
    opendir DIR, ".";
    print @{
    ...
        readdir DIR
    }->[0], $/;
    closedir DIR;
    
  2. or download this
    opendir DIR, ".";
    my ($oldest, @file) = map { -f $_ ? [$_, (stat _)[9]] : () } readdir D
    +IR;
    closedir DIR;
    ...
    }
    
    print $oldest->[0], $/;