Help for this page

Select Code to Download


  1. or download this
    opendir DIR, "/path/to/mlb/incomingdir";
    my ($todays_file) = reverse sort readdir(DIR);
    closedir DIR;
    
  2. or download this
    opendir DIR, "/path/to/mlb/incomingdir";
    my ($todays_file) = reverse 
                        sort 
                        grep {/mlb_boxscore\$\d{7}\.txt/} 
                        readdir(DIR);
    closedir DIR;
    
  3. or download this
    my ($todays_file) = reverse sort grep {/mlb_boxscore\$\d{7}\.txt/} readdir(DIR);