I tried using <STDIN> in EditPlus, and it crashes every time!
EditPlus is a text editor, right? And you're trying to run perl as a tool, executing your script in a hidden manner, and capturing its output into an editor window? I don't know what terminology EditPlus uses, but if I'm right, you should know what I mean: it's as if running a compiler from within the editor.

Well, I guess that Perl doesn't actually crash, but that it hangs — waiting for input, which it can't get because you can't enter it.

I can't think of a quick solution right now, except for not doing it this way, and instead, run the script from the command line (also known as the "DOS prompt"). For non-interactive scripts, running a script from within the editor is just fine.

Getting user input in another manner, via a GUI, is another, neat solution, however, it requires a lot of work, and I don't think a module for doing an "inputbox" (like a messagebox with a text widget — as available in VBscript, and Javascript too, IIRC) is available. Yet. You probably wouldn't want to use it anyway because you won't install modules </sneer>


In reply to Re: Getting user input by bart
in thread Getting user input by PartyMarty

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.