jaiieq has asked for the wisdom of the Perl Monks concerning the following question:
Title probably doesn't accurately describe the issue I am having, but I am having a brain freeze moment on something I think should be fairly simple.
I have an array that contains 'starting' and 'ending' positions of a string, like this in the format if 'start position:end position'. There is also some data attached to all this, but its irrelevant to the end goal.
$VAR1 = 0:6 $VAR2 = 0:12 $VAR3 = 0:18 $VAR4 = 0:24 $VAR5 = 6:12 $VAR6 = 6:18 $VAR7 = 6:24 $VAR8 = 12:18 $VAR9 = 12:24 $VAR10 = 18:24
What I need to get out of this is all the possible 'start' to 'end' positions. Which would look like the following:
I hope this all makes sense and thanks in advance for any help or insight!0:6 6:12 12:18 18:24 0:6 6:18 18:24 0:6 6:24 0:12 12:18 18:24 0:12 12:24 0:18 18:24 0:24 6:12 12:18 18:24 6:18 18:24 6:24 12:18 18:24 12:24 18:24
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Selectively iterate through an array
by tobyink (Canon) on Mar 14, 2013 at 16:36 UTC | |
by jaiieq (Novice) on Mar 14, 2013 at 18:15 UTC | |
|
Re: Selectively iterate through an array
by BrowserUk (Patriarch) on Mar 14, 2013 at 15:53 UTC | |
|
Re: Selectively iterate through an array
by kennethk (Abbot) on Mar 14, 2013 at 15:57 UTC | |
|
Re: Selectively iterate through an array
by blue_cowdawg (Monsignor) on Mar 14, 2013 at 15:39 UTC | |
by jaiieq (Novice) on Mar 14, 2013 at 15:54 UTC | |
|
Re: Selectively iterate through an array
by kcott (Archbishop) on Mar 14, 2013 at 19:54 UTC |