in reply to Why is the List upload with STDIN from a text file giving wrong result for mean?

split('', $list) will split the list to characters. You want to split the list on commas:
split /,/, $list
Also, if the parentheses are part of the input, you need to get rid of them. You can achieve that by
$list = s/[()]//g;
after you read the input.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Why is the List upload with STDIN from a text file giving wrong result for mean?
by supriyoch_2008 (Monk) on Nov 02, 2012 at 14:19 UTC

    Choroba

    Thank you very much for the prompt reply.

    Regards