in reply to system call error
- Print out the value of $elf_files[7] to determine if it has what you expect (See Basic Debugging Checklist)
- Consider some form of glob rather than shelling out to ls
- Consider extracting the last field in the line within Perl instead of piping to awk. That will remove the need for $NF = '$NF'; or equivalents.