in reply to Selecting a random number, and back calculating to chromosome and contig!

The errors/warnings you get when using strict and warnings are your clues as to what the problem is. Post them here for more rapid help with your problem. To get an even better response, describe what you were expecting the script to do.

As well, when posts to this site are long, people generally surround the large chunks, code for example, with ‹readmore› tags.

Good luck,