in reply to Simple Text Histogram

Can you tell me how I call this function? (e.g. what is the input to it like)? I tried show_histogram(@foo) where @foo = (1,2,3,4,5,6) and got garbage... thanks!

Replies are listed 'Best First'.
Re: Re: Simple Text Histogram
by Anonymous Monk on May 12, 2002 at 01:41 UTC
    It expects an array reference so try show_histogram(\@foo);
      Yup, calling it with ( \@array_name, size_of_bin, width ) works, but the output stuff could do with tons of improvement. Documentation leaves something to be desired. But, it does work:)
        It is useful, but it only gives meaningful output with integers. So, if you're interested in x places of decimals, you could use a regex to move the decimal point so many places. That way, I checked, it does give meaningful output.