in reply to Re: Re: Re: going loopy
in thread going loopy
From my earlier post, I had an array named @unique_slopes which if printed to the screen looks like this;
0.1375 0.102999999999999998 0.132500000000000002 0.264333333333333331 +0.636000000000000009 0.537499999999999989
I wish to be able to access each element individually and thought that using 'join' followed by 'split' would allow me to do this;
Split appears to be returning the original string as a single string accessible by $unique_slopes[[0]], which is not what I wanted.$unique_slopes = join ('', @unique_slopes); @unique_slopes = split (/\s+/, $unique_slopes);
Do you know of an alternative way to split the array so that I can access individual elements? A whitespace character appears to be present between each number.
Thanks for your time.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: going loopy
by broquaint (Abbot) on May 14, 2003 at 14:30 UTC |