in reply to Automated downloads from a date based URL

To just get the latest

#!perl use strict; use HTML::Treebuilder::XPath; my $URL = 'http://www.treasurydirect.gov/xml'; my $tree = HTML::TreeBuilder::XPath->new_from_url($URL); my @file = $tree->findnodes_as_strings('//li/a[contains(@href,"CPI_")] +'); my $latest = ( sort @file )[-1]; print "Latest = $latest";
poj