######################################################################## # Method: id # Use: Returns the bucket's unique identifier (handle) # Created: 07/30/1997 Del Croom (d.r.croom@larc.nasa.gov) # Updated: 07/28/1998 MLN ######################################################################## sub id { &http_header("text/plain"); foreach (@BIBFILE) { # search through bibfile for... $handle = $_ if (/^HANDLE::/); # HANDLE:: tag } if ($handle eq "") { # use ID:: tag instead then... foreach (@BIBFILE) { $handle = $_ if (/^ID::/); } } chop $handle; # remove trailing garbage $handle =~ s/HANDLE:: //; # remove tag $handle =~ s/ID:: //; # remove tag $handle =~ s/hdl://g; # remove service identifier # return handle string if ($handle eq "") { print "id cannot be determined (error in metadata file?) \n"; &log("id","ERR","id not found"); } else { print "$handle\n"; # print handle string &log("id","OK","-"); } } 1;