|laziness, impatience, and hubris|
QuickPerl: a step up from -eby John M. Dlugosz (Monsignor)
|on Jul 05, 2001 at 01:25 UTC||Need Help??|
John M. Dlugosz has asked for the
wisdom of the Perl Monks concerning the following question:
Experimenting and trying things, especially for this discussion group, I find that a lot of things are one-liners that can be done via -e. Some are difficult to do because of shell quoting issues, and some are a couple lines. Creating a file in the text editor, deciding on a name and saving it, then going to that directory on a command-line to run it seems overkill for something I should be able to do with -e or something like it.
So I've had it in the back of my head to make something as a shortcut. Implementing a "run contents as Perl" command for my usual text editor has issues: I still have to come up with a name, and it's not running under a console (text) environment.
So, I thought about a real simple Perl program that has a edit box and a Run button. (see end for concept code)
Now that it's underway, I'm thinking about other features. Here's a question: How can I separate out compiler errors from program's output? The program may itself write to STDERR, so if I can get Perl to write to someplace else... then the editor can parse errors and position the cursor. Note that I'm running another copy of Perl, not simply eval-ing the code, so it can always have a clean environment.
All thoughts welcome.