while (1) { # mabe a notice that your app is waiting for CDRW device to wake up here... open (TESTCDRW, ">$path_to_cdrw/touchtest.txt") and last; sleep 1; } close (TESTCDRW); do your stuff here...