in reply to
How to execute commands in the same shell as Perl script
You seem to be confusing just what a shell is. A shell is just another program. So bash is a program that runs in a process, as is ksh, as is csh, as is ls, as is ps, as is perl, as is python, etc. Some shell commands are 'built-ins', like cd, and those do not require a separate process. Others that can be shell commands, which you might inaccurately call an "OS command", are programs like ls and ps which have nothing to do with a shell - it is just that we often invoke them from a shell.
You can't directly 'source' the ls or ps programs for example, they are binary (ELF) executables that run in a separate process. You can source the command to invoke them, but they will still run in a different process to your shell. The perl program is no different.
Fortunately there are Perl equivalents to many UNIX programs and utilities that you might call from a shell, see UNIX 'command' equivalents in Perl.