@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 };
In reply to Re^2: GRT sort of files by time
by salva
in thread GRT sort of files by time
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |