Please see Markup in the Monastery for help on markup; as far as I can tell from your description, your array actually looks like this:

my @values = do { no warnings 'qw'; qw/ -0.709999984318709,60.690000003554324 -1.409999984834652,60.710000003710384 -1.389999984788378,60.970000003922536 -0.679999984264137,60.950000003761929 -0.709999984318709,60.690000003554324 / };

Right? As always, posting your actual code immensely helps us help you. Assuming I'm right, let me point you to two bits of documentation that should render the solution rather trivial: split and push. In general, you would create two arrays, say, @latitude and @longitude, and for each entry in @values, split it on the comma, and push the resulting values to their respective arrays. foreach will be of additional help if you are not yet familiar with Perl looping constructs.

Edit: Threw in no warnings 'qw'; in artificial scope to squelch "Possible attempt to separate words with commas" when running with warnings, as you should do.


In reply to Re: Splitting arrays by rjt
in thread Splitting arrays by whatahitson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.