in reply to Using grep with wildcards
sub SortDirectory() { my $arrayRef = $_[0]; @$arrayRef = ( sort(grep { -d } @$arrayRef), # sort dirs sort(grep { -f } @$arrayRef)); # sort files } [download]
buckaduck