withTimeout(30,\&doSomething,sub { die 'Oooops, doSomething was too slow' }); # <-- timeout after 30 seconds doSomething(); # <-- no timeout here