!/usr/local/bin/perl -w use strict; my @files=`find /home/sites/lctc/doc_root -name *.LCK`; my %users; foreach my $file (@files){ my $key=`cat $file`; chomp($key); $users{$key}.="\t$file"; } foreach my $key (sort(keys %users)) { print "$key \n $users{$key}\n\n"; } # output Kourtney (kourtney)||kourtney@ltc.org /home/sites/lctc/doc_root/go/donate/index.shtml.LCK [...] many red dot HD (toc)||toconnr@hotmail.com (blame tim) /home/sites/lctc/doc_root/go/jobs/index.shtml.LCK