#!/usr/bin/perl
use strict;
open(IN, '<', 'ex1.acc') or die;
my @list;
while (defined (my $line = <IN>)) {
   push(@list, (split(' ', $line))[0]);
}
close IN;

my $count = int(scalar(@list) * 0.40);

while ($count > 0) {
   my $pick = int(rand(scalar @list));
   printf("%s\t\%4.3f\n", splice(@list, $pick, 1), rand);
   $count--;
}
