Thank you; it seems to compile now, but it's crashing (runtime); there's a library installed on my system that it's not picking up. The error message is: jonathan@inner-sanctum:~/csi/ml$ ocamlrun ocaml ./demo.ml Cannot load required shared library dllpcre_stubs. Reason: dllpcre_stubs.so: cannot open shared object file: No such file or directory. Reference to undefined global `Pcre' jonathan@inner-sanctum:~/csi/ml$ Slocate finds the library in /usr/lib/ocaml/3.08.3/stublibs/dllpcre_stubs.so ; do I need to tell the script to search there? The script (missing " in" appended to the appropriate line) is: #!/usr/bin/ocamlrun ocaml (* Change the directories as needed for your system. *) #directory "/usr/lib/ocaml/3.08.3/pcre";; #load "pcre.cma";; #load "unix.cma";; #directory "/usr/lib/ocaml/3.08.3/netstring";; #load "netstring.cma";; #directory "/usr/lib/ocaml/3.08.3/cgi/";; #load "netcgi.cma";; open Netcgi let text = Netencoding.Html.encode_from_latin1 (* This function encodes "<", ">", "&", double quotes, and Latin 1 characters as character entities. E.g. text "<" = "<", and text "ä" = "ä" *) (* Normally you would use a template system instead of this *) let html_page (cgi:cgi) title html = let out = cgi#out_channel#output_string in out "\n"; out ("\n