in reply to Re: Did that file change?
in thread Did that file change?

You could also replace $fh ? stat($fh) : stat(_) with stat($fh || *_) .

Replies are listed 'Best First'.
Re^3: Did that file change?
by davidrw (Prior) on Jun 01, 2006 at 12:34 UTC
    cool! I was hoping someone would provide something like that since my original attempt of stat($fh || _) didn't work; I also abandoned an ugly eval attempt.

    So how does *_ work/what does the asterisk in that context mean?
Re^3: Did that file change?
by ruzam (Curate) on Jun 02, 2006 at 18:51 UTC
    Sweet! Thanks! Then the whole function boils down to a one liner:
    # note: order of the joined parts is not particularily important sub FileMeta { join ":", (stat(shift || *_))[0,1,7,9] }