in reply to Re^2: new shell - perl
in thread new shell - perl

That looks like a very different question ;-)

You can just exec 'script2'; At the end of the first script.

Replies are listed 'Best First'.
Re^4: new shell - perl
by opensourcer (Monk) on May 07, 2008 at 11:08 UTC
    i did tried that but after executing the statement which creates a new shell, the script exits and i get a prompt.
      You don't have to create a new shell in the script that changes the environment:
      # File foo.pl: $ENV{FOO} = 'bar'; exec 'perl', 'bar.pl'; # File bar.pl: print $ENV{FOO}, $/; # launch it: $ perl foo.pl bar