@temp = '/mydirectory/directory'; my ( @temp, %authors ); @temp = sort map { my @b=split; $b[2]; } `ls -l`; foreach ( @temp ) { $authors{$}=1 if not $authors{$_} and length $_; } print "$_\n" for keys %authors;'