if (grep {/myhost/}, qx){ #Do something }else{ #Addr was not found in trace }