ls doesn't exist everywhere. I didn't see any mentioning in the OP about any particular OS, so it's not safe to assume that the user is on a Unix-alike or something with an ls command (though ppt definitely comes close).
ls -l generates a lot of surplus output besides just the files. Furthermore, the output of ls -l is probably not standardised across different Unix systems.