#!/usr/bin/perl use strict; use constant FLEN => 10000; use constant SLEN => 50000; use constant FNUM => 15; my $fclass = shift || "Match"; my $fprefix = shift || 'seg'; # open STDOUT,"|sort -k4,4n" or die; for (1..FNUM) { my $start = int(rand(SLEN)); my $end = $start + int(rand(FLEN)); $end = SLEN if $end > SLEN; my $strand = rand(1) > 0.5 ? '+' : '-'; my $name = sprintf("$fprefix%02d",$_); my @rows = < $end; push @rows,< $end); if ($last_end < $end) { $rows[-1] = <