in reply to How to capture data from STDOUT?
I may be misunderstanding the problem, but from your question I have the impression that this is not something you need to solve using Perl. (??)
Executing:
at the shell should do it.binprogram >somefile
|
|---|