On Sep 23, 9:42 pm, soorajspadmanab...@gmail.com (Sooraj S) wrote:
> p2
> ===
> use Net::Telnet;
>
> $t = new Net::Telnet();
> $t->open("machine");
> $t->login("user","paswd");
> $t->cmd("p3 $flag");
> $t->close();
Since you are using the Net::Telnet Module.. it would have been better
if you used
}
> elsif ($? == 1) { print "failure"; }
> else { print "Undefined exit status"; }
>
>
>
> p2
> ===
> use Net::Telnet;
>
> $t = new Net::Telnet();
> $t->open("machine");
> $t->login("user","paswd&
;
> In p3 u can see that my $file = "/hom/user/file";
> I've given the location wrongly as a part of error handiling. So p3
> prints "Failed to create backup with exit status 256" and exits.
>
> In p2 i've checked "$?" value after $t->cmd
;
I've given the location wrongly as a part of error handiling. So p3
prints "Failed to create backup with exit status 256" and exits.
In p2 i've checked "$?" value after $t->cmd("p3 $flag") but it is
zero.
Pls help me.
--
To unsubscribe, e-mail: beg
(p2 $opt);
> if ($? == 0) { print "success"; }
> elsif ($? == 1) { print "failure"; }
> else { print "Undefined exit status"; }
>
>
Please see:
http://perl-begin.org/tutorials/bad-elements/
for how to write these codes properly.
>
&
value. I need the value 256 in p2. Could any one help me
to sove this..
p1
===
system(p2 $opt);
if ($? == 0) { print "success"; }
elsif ($? == 1) { print "failure"; }
else { print "Undefined exit status"; }
p2
===
use Net::Telnet;
$t
Irfan Sayed asked:
> call but in this case how shud i inform to windows batch script that the
> perl script execution / exit status is non zero and stop execution
> further
Use exit() with a non-zero argument.
Look at "HELP IF" for your windows batch programming question.
Hi Irfan,
Irfan Sayed wrote:
I have one windows batch script in which i am calling one perl script. now what
i want to do is if the exit status of that perl script is non zero then batch
script should not continue executing further and if the exit status is zero
then only it shud further
Hi All,
I have one windows batch script in which i am calling one perl script. now what
i want to do is if the exit status of that perl script is non zero then batch
script should not continue executing further and if the exit status is zero
then only it shud further execute.
normally we use
On Thu, Jan 1, 2009 at 07:38, Duck wrote:
> I am writing a script to ping several systems and then to run nslookup
> on those that fail the ping test. How do I capture the exit status of
> the system commands. I tried something like:
>
> $status = system("nslookup xxx.xx
On Thu, 2009-01-01 at 04:38 -0800, Duck wrote:
> I am writing a script to ping several systems and then to run nslookup
> on those that fail the ping test. How do I capture the exit status of
> the system commands. I tried something like:
>
> $status = system("nslo
I am writing a script to ping several systems and then to run nslookup
on those that fail the ping test. How do I capture the exit status of
the system commands. I tried something like:
$status = system("nslookup xxx.xxx.xxx.xxx");
print "$status";
but this seems to
Hi All,
I am executing a specific command thru perl script. if the output of the
command is NULL (not error , not any output) then that NULL output /
status i want to catch.
Can anybody please help.
Regards
Irfan.
Perldoc -f exit
-Original Message-
From: Paul Kraus [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:32 AM
To: [EMAIL PROTECTED]
Subject: Script Exit Status
Is there a way to have a perl script exit with a status code?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
>
>
> Is there a way to have a perl script exit with a status code?
>
> For instance I have ascript that calls another script via
> system("somescript");
>
> I want to then be able to get the exit status of that script.
>
> Paul
Have you seen the per
Is there a way to have a perl script exit with a status code?
For instance I have ascript that calls another script via
system("somescript");
I want to then be able to get the exit status of that script.
Paul
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comman
16 matches
Mail list logo