my $file = '/path/to/some/file'; while(1) { if ( -e $file ) { # read file # do stuff # unlink $file; # otherwise we will keep finding it } sleep 1; }