open my $pipe, '-|', 'long_running_process.pl'; $mw->fileevent($pipe, 'readable', $callback);