Getting the mode from a data set

trying to make a script that makes a list of random numbers and then outputs the mean, median, and mode of the list of numbers.
I'm currently stuck at mode part... stuck at a hash table with little to no idea how to accomplish it... any helpful hints?