Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restarting Perl Script

Status
Not open for further replies.

goliath

MIS
Aug 18, 1999
62
US
Is there an easy way to exit / restart the Perl script you're currently running?

Also, is there anything special to calling another external Perl script.

Thank you in advance for any help. Grabbing the Perl books now =)

-G
 
To call another perl script, you can "require" it, or "do" it, or call it with system() or backticks. To exit/restart, you could fork a child and then exit the parent. Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
system("/path/to/perl/script.cgi");

-------------

`/path/to/perl/script.cgi`;

------------

require "file.cgi";

&sub_name; # call a sub from within file.cgi

------------

Cheers
 
It sounds like you're interrested in exiting a script and run another one (or itself again) in its place. That's pretty much what exec("command"); does.

Check documentation: ----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top