On Tue, Nov 17, 2009 at 1:47 PM, Gabor Szabo wrote:
>
> Something like this ?
>
> open my $ph, "$cmd |" or die;
> while (my $line = <$ph>) {
>     $line =~ s/\n/<br>/gs;
>     print $line
> }
>

Looks right to me, except I think Issac will need to set autoflush,
e.g. using "++$| ;" at the beginning of his script, to get output
immediately as he asked for.

-- 
Offer Kaye
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to