Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Why is the List upload with STDIN from a text file giving wrong result for mean?

by choroba (Chancellor)
on Nov 02, 2012 at 11:26 UTC ( #1001949=note: print w/replies, xml ) Need Help??


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 (Scribe) on Nov 02, 2012 at 14:19 UTC

    Choroba

    Thank you very much for the prompt reply.

    Regards

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001949]
help
Chatterbox?
[choroba]: also, seeing communist propaganda I remember from my childhood... very strange experience
[LanX]: ha the Cuban experience
[LanX]: one strange thing I heard was that pharmacies in Vietnam are run by Russians

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2017-02-26 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (371 votes). Check out past polls.