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