Patch to LWP::Protocol::ftp to return last modified time

Charles C. Fu (ccwf@bacchus.com)
Sat, 4 Jul 1998 14:18:12 -0700 (PDT)


I wrote:
> This small patch retrieves last modified information for files on
> FTP servers using the MDTM command described in the IETF's draft FTP
> extensions (available at
> http://www.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-04.txt).

> + if($ftp->mdtm($remote_file) && $ftp->message =~ /^[1-9]\d{11}(.\d*)?$/)

Ugh, the grammar in the draft contains an error (says time values have
12 digits plus optional fractional part but it should say 14).  The
text and examples are correct and match existing practice.

So, the above should be replaced with something like

        if($ftp->mdtm($remote_file)
           && $ftp->message =~ /^[1-9]\d{13}(\.\d+)?$/)

-ccwf
Charles C. Fu