calling a external program

2005-11-02 Thread Markus
Hi all, Im looking for a way to call an external program and get back the result in an array without seeing anything on the STDOUT. If m using in example $path = \\; $result = system(dir, $path); I can see the output on the STDOUT but I cant find a way to put it in an array to

AW: Checking for internet connection

2005-11-02 Thread Dietmar Fiehn, Dr.
-Ursprüngliche Nachricht- Von: Michael D. Smith [mailto:[EMAIL PROTECTED] Gesendet: Mi 02.11.2005 00:23 An: perl-win32-users@listserv.ActiveState.com Cc: Betreff: Checking for internet connection Is there a right way/best way to check for an internet connection? You can ping

Re: calling a external program

2005-11-02 Thread Karl-Heinz Kuth
Hi Markus, I’m looking for a way to call an external program and get back the result in an array without seeing anything on the STDOUT. If ‘m using in example $path = “\\”; $result = system(“dir”, $path); I can see the output on the STDOUT but I can’t find a way to put it in an array

RE: calling a external program

2005-11-02 Thread LeFevre, Ken
Marcus: Here's some code that will execute your command and return what would normally go to STDOUT to the array @lines. my $path = \\; my $cmd = dir$path";my @lines;open X, "$cmd |"; @lines = X;close X; foreach my $line (@lines){ print "$line\n"; } Ken -Original

RE: Checking for internet connection

2005-11-02 Thread Thomas, Mark - BLS CTR
Michael D. Smith wrote: Is there a right way/best way to check for an internet connection? A strategy I use: Have a list of IPs to check, as high-availability as possible. Set a relatively low timeout for LWP. Loop through the IPs, checking each, and repeating the loop at least once. If you

Question on exit code of Win32::Process

2005-11-02 Thread Ted Zeng
Title: Question on exit code of Win32::Process Hi, I launch (use Win32::Process) an application as a detached process from a service. And I got The exit code is 3221225477. What does it mean? The application is supposed to run. But it just launches and quit right away (I can see it from task

Re: Question on exit code of Win32::Process

2005-11-02 Thread $Bill Luebkert
Ted Zeng wrote: Hi, I launch (use Win32::Process) an application as a detached process from a service. And I got The exit code is 3221225477. What does it mean? That error is a C005 which equates to: STATUS_ACCESS_VIOLATION Link may help explain or search M$ site for C005 :

Re: Question on exit code of Win32::Process

2005-11-02 Thread Ted Zeng
Hi $Bill, Thanks. This helps me find a problem. One more question: I use a service to launch an application. The service log on As System. If it log on as a user, it is not allowed to interact with desktop. The owner of the launched application is also System. I would like To have an normal