in reply to how perl interpreter works?

Every interpreter is pretty-much the same: the source-code is assimilated (from its various origin files) and parsed to create an internal data-structure which is then what drives the perlguts of the interpreter itself. When you read about "compile-time," that's the time spent building that structure.