chiark / gitweb /
quacks-ingredients: comments in autogenerated files
[reprap-play.git] / quacks-ingredients-counts
1 #!/usr/bin/perl -w
2
3 use Data::Dumper;
4
5 $_=<DATA>; chomp or die;
6 our @names = split /\t/, $_;
7
8 our %count;
9
10 foreach my $nspots (qw(1 2 3 4)) {
11     $_=<DATA>; chomp or die;
12     my @l = split /\t/, $_;
13     foreach my $i (0..$#names) { $count{$names[$i]}{$nspots} = $l[$i] // 0; }
14 }
15
16 $_ = Dumper(\%count);
17 s{^}{// }mg;
18 print or die $!;
19
20 __DATA__
21 White   Green   Blue    Red     Yellow  Purple  Black   Orange
22 20      15      14      12      13      15      18      20
23 8       10      10      8       6
24 4
25         13      10      10      10