Cool Peter, thanks! That's what I was looking for. > Use wrap-around indexing (eg, july: [-6..5]): > > $ perl -lwe' > > @mon = qw(jan feb mar apr may jun jul aug sep oct nov dec); > > $m = pop; > > print "@mon[$m - 12 .. $m - 1]"' 6 > jul aug sep oct nov dec jan feb mar apr may jun > $
- rotation of a fixed set Dan Brian
- Re: rotation of a fixed set Dan Brian
- Re: rotation of a fixed set matthew wickline
- Re: rotation of a fixed set peter allen
- Dan Brian