Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have some code that deciphers a desired value from @numbers which is stored in $best. I now need to find the corresponding value (in the same position in the array to) to $best in the @data array. I have no idea how to do this! To make the problem clearer;@numbers @data
say that for example $best is 76.5, i need away of returning 0.456, without simply using $numbers2. Hope someone can help?! thanksmy @numbers = ('0.001','0.34','0.456','0.521'); my @data = ('70.1','75.3','76.5','87.4');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: relating arrays
by japhy (Canon) on Dec 05, 2002 at 15:03 UTC | |
|
Re: relating arrays
by LTjake (Prior) on Dec 05, 2002 at 15:12 UTC | |
|
Re: relating arrays
by diotalevi (Canon) on Dec 05, 2002 at 15:07 UTC | |
by FamousLongAgo (Friar) on Dec 05, 2002 at 17:02 UTC | |
|
(jeffa) Re: relating arrays
by jeffa (Bishop) on Dec 05, 2002 at 15:09 UTC | |
|
Re: relating arrays
by dvergin (Monsignor) on Dec 05, 2002 at 20:27 UTC |