Sparkline in unicode: Difference between revisions
Content deleted Content added
Thundergnat (talk | contribs) m syntax highlighting fixup automation |
SqrtNegInf (talk | contribs) m →{{header|Perl}}: future-proof for 5.36, explicit :prototype |
||
Line 1,790: | Line 1,790: | ||
<syntaxhighlight lang="perl">binmode(STDOUT, ":utf8"); |
<syntaxhighlight lang="perl">binmode(STDOUT, ":utf8"); |
||
our @sparks=map {chr} 0x2581 .. 0x2588; |
our @sparks=map {chr} 0x2581 .. 0x2588; |
||
sub sparkline(@) { |
sub sparkline :prototype(@) { |
||
my @n=map {0+$_} grep {length} @_ or return ""; |
my @n=map {0+$_} grep {length} @_ or return ""; |
||
my($min,$max)=($n[0])x2; |
my($min,$max)=($n[0])x2; |