Gossamer Forum
Home : General : Perl Programming :

system(blat) echo

Quote Reply
system(blat) echo
I'm having a echo problem with system($blatcommand). It is printing the results on my webpage .... i.e.

"sending path/to/file to ..... "

i tried the following code but *all* my result (including the thank you message) is printed to $blatlog

Code:

open(STDOUT, ">>$blatlog");
system($blatline);
close (STDOUT);

Can you sggest me a way to keep blat *positive* response out of my thank-you page ?

Thanks!!!
Quote Reply
Re: [robyone] system(blat) echo In reply to
I thought I already gave you something to try in your duplicate thread ;)

I suggested STDERR
Quote Reply
Re: [Paul] system(blat) echo In reply to
Paul,
i have no success. I used STDERR as well. It looks like it is managed like a STDOUT. But when i use STDOUT all my thank-you page goes in the log file.

"sending to ....."

is still printed on my page. I know that system()should not print but I can't remove that ugly message. My ISP can't help me so I guess it is something in the code.

Is there a way to *delete* system responses?

or

Is there a way to print only system() in the logfile? I have already tried to close STODOUT ....no success :((((

roby

Last edited by:

robyone: May 16, 2002, 5:02 AM
Quote Reply
Re: [robyone] system(blat) echo In reply to
What code do you have so far?
Quote Reply
Re: [Paul] system(blat) echo In reply to
Code:

open (MAIL, ">$file"); print MAIL "$mailbody\n"; close MAIL;

$blatline = "\"$emailprogram\" $file -s \"$subject\" -f $mailfrom -t $mailto -server $emailserver";

#WHAT I TRIED ...
#open(STDOUT, ">>$blatlog"); #EVERYTHING LOGGED INCL. &tankyou
#open(STDERR, ">>$blatlog"); #nothisng .. it is not a error
#select(STDERR); #no success with this. not an error

system($blatline);

unlink($file);

&thankyou;

Last edited by:

robyone: May 16, 2002, 5:23 AM
Quote Reply
Re: [robyone] system(blat) echo In reply to
Ok I see what you mean.....

http://213.106.15.150/cgi-bin/mail.cgi

Im trying a few things to stop it doing that.

Last edited by:

Paul: May 16, 2002, 5:55 AM
Quote Reply
Re: [Paul] system(blat) echo In reply to
let me know if you find a solution ...


thanks
Quote Reply
Re: [robyone] system(blat) echo In reply to
Ok can you try:

qx/$blatline/;

...rather than using system();

If you ever need to print the output you can do:

my $output = qx/$blatline/;
print $output;
Post deleted by Paul In reply to

Last edited by:

Paul: May 16, 2002, 6:39 AM