http://www.perlmonks.org?node_id=993023


in reply to Re^3: Opening random files then reading random lines from file.
in thread Opening random files then reading random lines from file.

Or use the Mersenne twister. Search cpan.