in reply to Re^2: printenv not displaying results
in thread printenv not displaying results

How does perl interpreter understand that this is perl file without .pl extension ?

You're dealing with Apache, Apache decides what to call, how, and when.