Re: parsing a program's output as its running (in perl)

2003-01-05 Thread Mark Price
> ahh yes, thank you. but i ran into a little problem. consider the code: > > open PIPE, "| /usr/bin/mplayer args" or die "failed to open pipe, $!" > while ( ) { > if ($condition) { > close(PIPE); > } > else{ > # process line > } > } > > it

Re: parsing a program's output as its running (in perl)

2003-01-04 Thread christopher j bottaro
ahh yes, thank you. but i ran into a little problem. consider the code: open PIPE, "| /usr/bin/mplayer args" or die "failed to open pipe, $!" while ( ) { if ($condition) { close(PIPE); } else{ # process line } } it seems that

Re: parsing a program's output as its running (in perl)

2003-01-04 Thread christopher j bottaro
hmm, i guess i can open it as a pipe...hmm, yes, that is exactly what i was looking for... On Saturday 04 January 2003 05:45 pm, christopher j bottaro wrote: > hello, > i'm writing a little dvd to divx perl script using mencoder and a 3 pass > method. i want to allow auto cropdetection and cropp

parsing a program's output as its running (in perl)

2003-01-04 Thread christopher j bottaro
hello, i'm writing a little dvd to divx perl script using mencoder and a 3 pass method. i want to allow auto cropdetection and cropping. to find the crop parameters, you gotta run mplayer and watch the output for the crop parameters. well, i suppose in perl i can capture mplayer's output with