Re: Problem with perl system() function

2004-04-29 Thread Brian Reichert
On Wed, Apr 28, 2004 at 03:55:23PM -0400, Alejandro Galue wrote: > > I tried this (inside the handler): > > ... > my $cmd = '/opt/reports/bin/getdata'; > system($cmd, @params); > if ( open(DATA, '/opt/reports/var/data.txt') ) { > local $_; > while () { $r->print($_) } > close DATA; >

RE: Problem with perl system() function

2004-04-28 Thread Dr. Helmut Zeilinger
t; -Original Message----- > From: Tom Schindl [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 28, 2004 3:29 PM > To: Alejandro Galue > Cc: [EMAIL PROTECTED] > Subject: Re: Problem with perl system() function > > Hi, > > system will wait until the executed shell-

RE: Problem with perl system() function

2004-04-28 Thread Alejandro Galue
ginal Message- From: Tom Schindl [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 28, 2004 3:29 PM To: Alejandro Galue Cc: [EMAIL PROTECTED] Subject: Re: Problem with perl system() function Hi, system will wait until the executed shell-script has finished. I'd rather guess that you are not

Re: Problem with perl system() function

2004-04-28 Thread ydnar
You could use IPC::Run, which lets you pipe data to an executable, then read the result back: use strict; use IPC::Run qw(start finish pump); sub handler { my $r = shift; my $html = qw { Foo Bar Baz

Re: Problem with perl system() function

2004-04-28 Thread Stas Bekman
Alejandro Galue wrote: Hello All, I´m using mod_perl2 and Apache2 over Fedora Core 1. I have a handler that need to call an external program to complete the request. This program put its output to a file, and then I read this output from the handler (after system function) to complete the request

Re: Problem with perl system() function

2004-04-28 Thread Tom Schindl
Hi, system will wait until the executed shell-script has finished. I'd rather guess that you are not allowed to call the commandline programm you'd like to call. Did you get any thing in the error_log? How do you call the system-command: * system *`` * qx Maybe you could show us the code you'r

Problem with perl system() function

2004-04-28 Thread Alejandro Galue
Hello All, I´m using mod_perl2 and Apache2 over Fedora Core 1. I have a handler that need to call an external program to complete the request. This program put its output to a file, and then I read this output from the handler (after system function) to complete the request. My problem is (I a