in reply to where does this "%time" come frome?

It (the undeclared, package global %time), is constructed in the sub wanted:

sub wanted { my $sb = stat($_); # XXX: should be stat or lstat? return unless $sb; $time{$name} = $sb->$IDX( ); # indirect method call $stat{$name} = $sb if $opt_l; }

Because it is global, and the sub is called before the sort, it is populated by that time.

(Those horrible, old-fashioned perl4-style examples put me off of most of the Perl books I purchased.)


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: where does this "%time" come frome?
by lightoverhead (Pilgrim) on Sep 25, 2014 at 03:03 UTC

    thank you guys.

    I should be more careful for reading this.