Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: How to iterate thru entire array with start point other than beginning

by soonix (Canon)
on Sep 02, 2016 at 12:30 UTC ( [id://1171051]=note: print w/replies, xml ) Need Help??


in reply to Re: How to iterate thru entire array with start point other than beginning
in thread How to iterate thru entire array with start point other than beginning

no need to concatenate two ranges. Instead of
my @sel = @month_name[$startMonthIdx .. 11, 0 .. $startMonthIdx - +1];
you can use
my @sel = @month_name[$startMonthIdx - 12 .. $startMonthIdx - 1];
gives the same output as above.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1171051]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-29 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found