  use Data::Random qw(:all);
  use Date::Format;
#  my $langs = Date::Language->new('German');
  @lar=();@ps=();@ts=();
  for $i (1..12) {
      $lar[$i - 1] = int(3.2*$i/0.3 - 1.618*rand(3.5*$i)/(0.7));
      }
  print join(' ',@lar),' ',ttfn(@lar)," lar \n";
      
#        $lang->time2str("%a %b %e %T %Y\n", time);
        $lang = time2str("%H %l %M\n", time);
        $tl=\@lar;
        $tcc=$lang;
        $tc=\$tl;
        $tlp=ref($tc);
        print $lang,' ',@lar,'/',@$tcc,'/',"\n";
  open(FILE, ">rand_image01.png") or die $!;
  binmode(FILE);
  print FILE rand_image(minheight => 180,minwidth => 320, pixels => 512*8, bgcolor => [10, 25, 80] );
        $time = rand_time(minimum => '01:10');
      @pp = localtime($time);
    $tf=rand(1)/2.*0+$pp[0]/24./2.*1.0;
  
  $tr=1.01/$tf;$tfn=$tf;
      for $i (1..12) {
      $time = rand_time(minimum => '01:10');
      @pp = localtime($time);
      $tt = time2str("%H %l %M\n", $time);
      $lar[$i-1] = int(rand(19-$i)*13.9-1.013*$i/2.92);
      $ts[$i-1] = int($lar[$i-1]*$tfn);
      $tf=$tf+$lar[$i-1];
      $tr=$tr+1.01/($lar[$i-1]+0.1);
      $tfn=$tf/$tr/$i/$i;
      $tfn=1/$tfn;
      $ps[$i-1] = $pp[0];
      print $pp[0]+int(2*rand(1)),'/',' ',int(rand(1)*24),'z ',$tt,' ',$tfn,' ',$pp[0],'z ',$time;
  }
  print ' ',ttfn(@lar),"\n";
  print join(' ',@lar),"\n";
  print join(' ',@ts),"\n";
  print join(' ',@ps),' ',ttfn(@ps),"\n";
  print join(' ',sort {$a<=>$b} @lar),"\n";
  $tstr="ASDF234";
      @ps = localtime();
      @pp = localtime($time);
      foreach $i (@ps) {
          print $i,' ', $ps[$i], '/';
      }
      print $time, ' ',@pp,' ',$pp[0],' ',int(rand(24)),' ',lc $tstr,"\n";
#      system('grep --version');
  close(FILE);
  sub ttfn {
   (@arr)=@_;
   $ts=0;$n=0;$tr=0;
   foreach $i (@arr) {
    $ts=$ts+$arr[$i];
    $tr=$tr+1.1/($arr[$i]+0.1);
    $n=$n+1;   
       }
    return $ts/$tr/($n*$n);      
      }
      