my $filename = "/home/bob/reports.html"; while(1){ if(-e $filename){ print "done!\n"; exit; } }