Hello,
I have one question - I know how to do this, but maybe someone shows
me, how to do it better (for sure!). Ok, here we comes:
I have:
my @array = ( '1/2/1',
'1/2/2',
'1/4/2',
'2/1/1',
'2/1/1',
'3/1/1' );
and now the task:
I want to have in $out = '1/2/1', why ?
This is 3 (values to compare) of 3 (values in 1 field) statistics:
Ok, first pick up _first_ number, do statistics (1 is winner),
we get new array, next pick up _second_ number from @newarray (2 is
winner), pick up third number and do statistics, if here is no winner, so
return first value we have in list.
I think this is nice example for recursive function, do you agree ?
Ok, I am code that, so I am looking for your suggestions, too :)
(Also would be nice, if we have for example '1/2/2/3' values and do
3 values compare statistics, so it could be:
3 values to compare of 4 values in 1 field and similar counts, where
always (values to compare) <= (values in 1 field)
any ideas ? :)
--
--. ,-- ,- ICQ: 7552083 \|||/ `//EB: www.2ge.us
,--' | - |-- IRC: [2ge] (. .) ,\\SN: 2ge!2ge_us
`====+==+=+===~ ~=============-o00-(_)-00o-================~
Quantum particles: the dreams that stuff is made of. -- David Moser
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>