in reply to Getting user input

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>

Replies are listed 'Best First'.
Re: Re: Getting user input
by Grygonos (Chaplain) on Dec 11, 2003 at 14:01 UTC

    You can use TextPad on windows and make the perl interpreter a menu command. Then it executes the currently open file from a dos window. Textpad will also use wperl if you map that command too. It's quite easy. If you need help just pm me.

    p.s. it maps the command to CTRL\d ..for instance my perl interpreter is mapped to CTRL+1

    Grygonos