Win has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Last modified time
by jasonk (Parson) on Apr 05, 2006 at 13:09 UTC

    You can get the last modified time of a file using stat. But I don't know how you expect to get it using a program that is not running.


    We're not surrounded, we're in a target-rich environment!
Re: Last modified time
by Zaxo (Archbishop) on Apr 05, 2006 at 13:13 UTC

    stat ought to work. $0 should provide the argument for the current running program. If that doesn't work, look at perlport and perlwin32 to see what changes you need.

    For some other program, just use its path/filename as argument to stat.

    After Compline,
    Zaxo

Re: Last modified time
by perlsen (Chaplain) on Apr 05, 2006 at 13:22 UTC
    Hi Win, Try this
    $modifytime = (stat($filename))[9]; print $modifytime;
    Regards
    Perlsen
    A reply falls below the community's threshold of quality. You may see it by logging in.