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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl Script

Status
Not open for further replies.

biobrain

MIS
Joined
Jun 21, 2007
Messages
90
Location
GB
Dear All,

I need some help in writing a perl script.

Here is a pseudo code

!/usr/bin/perl -w

system (./spd.pl)

IF system (./spd.pl) execute or true then

system (./spd2.pl ) ElSE exit/die,

Please help me writing this small script.

Regards
 
Code:
my $result = system (./spd.pl);
If the system call exits successfully, $result will be 0. If there was an error, it'll be something else.
 
For executing other perl scripts, stick with "do"

Code:
[url=http://perldoc.perl.org/functions/do.html][black][b]do[/b][/black][/url] [red]'[/red][purple]spd.pl[/purple][red]'[/red][red];[/red]

Dealing with all possible error contingencies is included in the documentation for the function.

- Miller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top