in reply to Clarifying code

The join can be replaced by a less-noisy interpolating quote. If self-documentation is important, you may want a named constant for the mtime:

use constant MTIME => 9; my prettyFileTime = localtime( (stat "$dir/$file")[MTIME]);
but I don't see much wrong with what you have.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Clarifying code
by Thelonius (Priest) on Aug 27, 2002 at 19:44 UTC
    You can also use File::stat
    use File::stat; my $prettyFileTime = localtime( stat("$dir/$file")->mtime);
Re: Re: Clarifying code
by Kanji (Parson) on Aug 27, 2002 at 19:50 UTC