in reply to Why is the List upload with STDIN from a text file giving wrong result for mean?
Have you looked at the contents of @array?
Maybe it helps you if you explain what @array=split('',$list); is supposed to do, and compare that with the documentation of split.
In Section
Seekers of Perl Wisdom