in reply to Code challenge: array subrange
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}} }] }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Code challenge: array subrange
by demerphq (Chancellor) on Jan 13, 2005 at 12:56 UTC | |
|
Re^2: Code challenge: array subrange
by Jasper (Chaplain) on Jan 14, 2005 at 10:37 UTC |