App-FileCleanerByDiskUage

 view release on metacpan or  search on metacpan

lib/App/FileCleanerByDiskUage.pm  view on Meta::CPAN


	# get the stats for all the files
	my @files_info;
	foreach my $file (@files) {
		my %file_info;
		my $not_used;
		(
			$not_used, $not_used, $not_used, $not_used, $not_used,
			$not_used, $not_used, $not_used, $not_used, $file_info{mtime},
			$not_used, $not_used, $not_used
		) = stat($file);
		$file_info{name} = $file;
		push( @files_info, \%file_info );
	} ## end foreach my $file (@files)

	# sort files oldest to newest based on mtime
	@files_info = sort { $a->{mtime} cmp $b->{mtime} } @files_info;
	# set this here as we are saving it into the hashref as a array ref
	my @files_info_copy = @files_info;
	$results->{found_files} = \@files_info_copy;



( run in 0.976 second using v1.01-cache-2.11-cpan-49f99fa48dc )