This blogger does not seem to know that in the POSIX shell syntax, redirections can be specified anywhere in the command:
< access.log head -n 500 | grep mail | perl -e
Now you can delete "head -n 500 |".> If we then delete only the head processing step we’re left without a step that transforms the string access.log into the contents of the access log.
By introducing "cat access.log" we have the same problem: if we delete only the cat processing step, we're left without a step that transforms the string access.log into the contents. For the useless cat to have the nice property that you can cleanly delete it from the command line, you need:
< access.log | cat | head -n 500 ...
:)