or download this
my $limit = 99999;
my $md;
...
$tmpname = int(rand($limit)); #$tmpname = convert t
+o integer random number between 0 and $limit (99999)
$md = "$TMPDIR/runitout_$tmpname"; #$md = "$TMPDIR/run
+itout_$tmpname" concatinated values of $TMPDIR (not listed) the strin
+g "/runitout_" and the value of $tmpname
} until (! -f "$md"); #until file $md does
+ not exist