Scott Taylor wrote: > Hello all, > > I have a CGI script that I need to display the output of a shell program, > basically a simple C program that parses some text. > > The output is right to the browser, and I don't want it to be creating any > new files or anything. I have a data field that has a blob and that blob > needs to be parsed and the output returned to the browser. > > What is a good way to do this: > > while ( my ($row ) = $sth->fetchrow_hashref ) { > my $raw_data = $row->{BLOB}; > my $parsed_data = system ("echo $raw_data|pasrer"); > ... > } > > of course that doesn't work, but what would be the right way to do it? > > Cheers. > > -- > Scott >
You should have a look at the section "Pipe Opens" in, perldoc perlopentut Should be what you are looking for. I do assume you have a good reason for writing the parser in C.... http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>