|
|
| We don't bite newbies here... much | |
| PerlMonks |
How do I handle circular lists?by faq_monk (Initiate) |
| on Oct 08, 1999 at 00:20 UTC ( #614=perlfaq nodetype: print w/ replies, xml ) | Need Help?? |
|
Current Perl documentation can be found at perldoc.perl.org. Here is our local, out-dated (pre-5.6) version: Circular lists could be handled in the traditional fashion with linked lists, or you could just do something like this with an array:
unshift(@array, pop(@array)); # the last shall be first
push(@array, shift(@array)); # and vice versa
|
|