use strict; open (IFILE,"testfile.txt") or die $!; my %values; my $maxvalue; while () { my ($tag,$value) = split /\s/,$_; $values{$tag} = $value; if ($value > $maxvalue){$maxvalue = $value} } for (my $counter=$maxvalue;$counter>0;$counter--) { foreach (keys %values) { if ($values{$_} >= $counter) { print "#"; } print "\t\t"; } print "\n"; } foreach (keys %values) { print "$_\t"; if (length($_) <8){print "\t"} } print "\n"; #### use strict; open (IFILE,"testfile.txt") or die $!; my %values; my $maxvalue; while () { my ($tag,$value) = split /\s/,$_; $values{$tag} = $value; if ($value > $maxvalue){$maxvalue = $value} } print ""; for (my $counter=$maxvalue;$counter>0;$counter--) { print ""; foreach (keys %values) { if ($values{$_} >= $counter) { print ""; } else { print ""; } } print ""; } print ""; foreach (keys %values) { print ""; } print "
 
$_
";