Ok, thanks for the help.
I was trying to use your code and do a
gsl_histogram_fscanf($stream, $h)
What is the $stream? I read it has been opened by the gsl_fopen_function from the Math::GSL module. Does that mean it is already predefined and I don't have to define it myself. I get a compile error.