use File::stat; $st = stat($file) or die "No $file: $!"; if ( ($st->mode & 0111) && $st->nlink > 1) ) { print "$file is executable with lotsa links\n"; } #### my @listfiles=`ls -l ./`; foreach(@listfiles) { chomp; $_=~s/ /\t/g; my @details = split(/\t/, $_); print "$details[-1]: $details[0]\n"; }