sub righter {$_[0]..$_[1],reverse(pop..pop)} sub array_range {
Well, I didn't really consider where I was putting the sub - moved it outside to appease demerphq ;).$h = pop; @rel{ righter @{$h->{range}} } = @{$h->{arr}}; [@rel{ righter@{ $h->{subrange}} }] }
In reply to Re: Code challenge: array subrange
by Jasper
in thread Code challenge: array subrange
by spurperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |