use strict; use warnings; use IPC::Cmd; &run; sub run { while ( 1 ) { eval { &_run_cmd }; print $@ if $@; sleep 10; } } sub _run_cmd { my( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = IPC::Cmd::run( command => 'blubb', verbose => 0 ); print $success, "\n"; }