in reply to Re^2: Grouping files with the same name...in thread Grouping files with the same name...
(You'll need to opendir $dh first) fixed.
grep is not a unix command but a built-in Perl function.
-David