Well, I get the same thing happening to me whenever I run any scripts on Windows. What do you mean by "terminates"?

If you mean that the program exits and returns you to the C:\ prompt (or wherever) then I have no idea.

However, what always happened to me is that the DOS window I was running the thing in would simply vanish. If this is the problem, do not run the perl script by double-clicking on the icon. In my case would run fine, but when the last bit of output is reached (In this case, your "hello") it would print it and then IMMEDIATELY kill the window.

The solution was to open the DOS window first (Start --> Programs --> MS-DOS Prompt if my memory is holding out) and then run your script using perl "location" where "location" is the path to your script.

It's also worth noting that if Perl isn't in your PATH, that won't work unless you're in your Perl directory.


In reply to Re: Generating EOF character on Win98 by Anonymous Monk
in thread Generating EOF character on Win98 by nysus

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.