my $fo = gsl_fopen('myfile', 'w'); # sets the output file my $fi = gsl_fopen( $input_stream ); # here is where I can't understand how it works my $h = gsl_histogram_alloc (5); gsl_histogram_fscanf($fi, $h); my $range = [ 1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0 ]; gsl_histogram_set_ranges($h, $range, 4); gsl_histogram_fprintf($fo, $h, "%g", "%g"); gsl_fclose($fi); gsl_fclose($fo);