If you use
Apache, it might give your cgis some string like "P4-RKJhCUwEAABeK9DY" in $ENV{UNIQUE_ID}. This string is not quite random, but is different in each cgi invocation. This feature need not be enabled on your system, so you should check it before using it. See also
http://httpd.apache.org/docs/mod/mod_unique_id.html