Hello dear perl monks!

It might be a rather simple question but it is quite complicated fo me as I have started to study perl only this morning. So in fact I am a molecular biologist. The question itself is the following:

I have a huge number of scored distances between two types of genes. A small part of it looks like this:

2483 2490 2494 2496 2500 2501 2508 2517 2518 2519 2527 2530 2541 2541 2542 2555 2557 2561 2562 2565 2572 2572 2575 2582 2585 2588 2589 2597 2598 2603 2604 2608 2611 2620 2632 2642 2643 2645 2647 2649 2651 2659 2661 2664 2667 2669 2670 2673 2675 2677

I would like to build several distributions of these lengths with different bins. So, what will be the propper way to devide these data into certain intervals and to count the number of elements in each interval using perl?

I will be very grateful if you could help.

In reply to build a distribution by Grig

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.