use strict; use warnings; my @n = (101, 203, 321, 45, 67, 156, 203, 502, 899, 2003, 5007, 8020, 7301, 5030, 3045, 1243, 567, 321, 234, 45, 123, 453); my $cutoff = .06; my $max = 0; for (@n) { $max = $_ if $_ > $max; } $cutoff = $max * $cutoff; for (@n) { $_ = 0 if $_ < $cutoff; print $_ ? '-' x ($_ * 50 / $max) : '', "\n"; } #### --- ----- ------------ ------------------------------- -------------------------------------------------- --------------------------------------------- ------------------------------- ------------------ ------- ---