Hi All,

This is my first posting :)

I urgently need some help!!

I am trying to call a perl script from another and capture the exit status (whether successful or not). How should I go about it?

Please help....

Thanks in advance,
Bucchi

Recommended Answers

All 2 Replies

use

system("command");

on a uniy system, do man perlfunc and search for system. I don't know where the docu is on windows, but since you are using it, you should, so if you are using windows look up the system call in the docu.

To capture the exit code, just test the value of $?. This is an alias for the $CHILD_ERROR special variable, and this variable will contain the exit code for the last system() call or backticks call.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.