UNIX shells are interpreters, they "compile" one statement at a time at run-time. They don't really compile even then, just translate your statements into calls to their own internal functions, or run other programs.
Perl, on the other hand, does not do statement-by-statement interpretation, but builds (kinda compiles) the whole program in memory then executes it. You don't use -c to compile your perl scripts - that does a syntax check - see
.