in reply to Re: GRT sort of files by time
in thread GRT sort of files by time
@files is a lexical not available from outside its scope. You are actually sorting nothing.... my @files=glob '*'; ... cmpthese -30, { map { $_ => "$_(\@files)" } @sub };
You can solve that bug using a global variable for @files:
... our @files=glob '*'; ... cmpthese -30, { map { $_ => "$_(\@main::files)" } @sub };
|
|---|