Set environment

Hi,

I can run shell script from the command line using

$ . set

If the run the script inside perl script using

$var = system\("set"\);

print $var;

This prints 0.

This command sets up the environment from command line. But when used inside the shell script or perl script it doesnot work

Please help how this can be called with in shell script

If set is not in a directory in your PATH, use the full path to the file.

set is in the same directory.
But the shell script executed in the command line is

$ . set

But same command does not execute