Hello sonivikas,
jett's suggestion of using a 'require' statement might do what you are looking for. Using a 'require' will, conceptually speaking, fold the code from the 'require'd program into the calling program so they run/act as one larger program.
Some other options.....
To launch any executable from inside a piece of Perl code, there are three options....
[red]system[/red], [red]exec[/red], and [red]backticks[/red].
exec - kills the current process and starts the specified new program
exec(secondProgram.pl);
system - starts the second program and waits for it to finish and then continues to run.
system(seconProgram.pl);
backticks or grave's accents ` - same as the system function.
Each of these functions should be wrapped in a little error checking......
unless (system(secondProg.pl)) { print "some gripe about life"; }
You could also use 'fork', but the exec and system functions take care of some house keeping that 'fork' does not.
'hope this helps.... [sig]<p> <br><a href=mailto: > </a><br><a href= > </a><br> keep the rudder amid ship and beware the odd typo[/sig]