Hello, it won't solve any of you problems but I have a few remarks on your code: > exception SplitError > > let read_whole_chan chan = > let movieMajor = Hashtbl.create 777777 in Here, movieMajor in declared inside read_whole_chan and never returned, so you won't be able to use it (but it might as well be a test program I guess). > let rec loadLines count = > let line = input_line chan in > let murList = Pcre.split line in > match murList with > | m::u::r::[] -> > let rFloat = float_of_string r in > Hashtbl.add movieMajor m (u, rFloat); > loadLines (count + 1) You use tail-recursion properly so your Stack overflow doesn't come from there. No idea why it occurs, though... > | _ -> raise SplitError > in > > try > loadLines 0 > with > End_of_file -> () > ;; > > let read_whole_file filename = > let chan = open_in filename in > read_whole_chan chan > ;; You should close the chan when you're done. > let filename = Sys.argv.(1);; > > let str = read_whole_file filename;; Regards, -- Gabriel Kerneis