Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # For some reason, this was raising hell after adding
- # use namespace::autoclean;
- my $percent_captions = sub {
- my @left = @_[ 0 .. $#_ - 1 ];
- my @right = @_[ 1 .. $#_ ];
- return "< $_[0]%", pairwise {"$a to $b%"} @left, @right;
- };
- my @pcts = ( 1, 5, 10, 25, 50, 75, 100 );
- my @pct_captions = $percent_captions->(@pcts);
- # So, I replaced it with this.
- my @pcts = ( 1, 5, 10, 25, 50, 75, 100 );
- my @pct_captions = (
- "< $pcts[0]%",
- map "$pcts[$_-1] to $pcts[$_]%", 1..$#pcts
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement