my $rand= md5_hash_hex( rand() . $$ . $x . "super secret" ); mkdir( "$x/$rand" ); if( -d "$y/$rand" ) { warn "$x == $y\n"; } rmdir( "$x/$rand" );