I'm sorry to spoil your party, but your script works for me. Like I already said in the Chatterbox, it probably is just waiting for you to enter data. Even if you don't see any prompts, try entering numbers followed by return at the console, and see if it responds to it.

If it does, and I bet it will, it would be a good idea to set

$| = 1;
near the top of your script.

Furthermore, your gives a few warnings, caused by

undef $x; for(@exes){ $x=$x+$_; }
which can be fixed by eiter setting $x to 0 instead, or by doing
undef $x; for(@exes){ $x += $_; }
which does the same thing, but is shorter, and doesn't warn if $x is undef.

Worse, there's a nasty error, that makes your script output a wrong result: the power operator in Perl is **, not ^, which does XOR. See perlop. So:

for(@exes){ $tot += ($_-$ave)**2; }

In reply to Re: Refusal to Run by bart
in thread Refusal to Run by Andrew_Levenson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.