in reply to beginner question about stat fucntion

That's shorthand for

my @ary = stat $path; $time = $ary[9];

since stat returns a list. A list can be subscripted.