in reply to Re: Re: QuickPerl: a step up from -e
in thread QuickPerl: a step up from -e

Well, if you say you don't get console environment when run something from an editor on Windows, I believe you - but I'm very, very surprised your Tk solution does. After all, what that does is taking your code, putting it in a file, and executing it. Which is *exactly* what my macro does, except that it already finds the stuff to be run in a file. I don't know much about Windows, but I'd like to know which magic Windows performs that makes the system()ed program from Tk get a "console environment", while the program run from an editor doesn't.

-- Abigail

Replies are listed 'Best First'.
Re: Re: QuickPerl: a step up from -e
by John M. Dlugosz (Monsignor) on Jul 05, 2001 at 06:10 UTC
    but I'd like to know which magic Windows performs that makes the system()ed program from Tk get a "console environment", while the program run from an editor doesn't

    Because Perl/Tk, although it shows windows and has an event loop, is still a Console-mode program: perl.exe. The variation wperl.exe is compiled as a GUI-mode program, and even if you write knowing there is no STDIN or STDOUT, there are still a few oddities that don't quite work right.

      Why not just use emacs? It has a shell mode, so you can edit your script in one "window" and run it in shell in the other. It works on both DOS and Unix/Linux (if memory serves DOS shell isn't nearly as nice as Unix, but it does work-- I'll have to double-check this at work tommorrow, and please forgive me if I mispeak). Plus you get all the added benefit of having any output saved in a buffer which is fully cut-and-paste-able. Not to mention the other zillion little things it does that are just plain handy.

      Disclaimer: I've been reading ORA's "Learning GNU Emacs" and I may not currently be enjoying a lot of objectivity in this area.
        Let me know for sure when you look at it, thanks.

        A compelling feature of the editor I use is the symbol parsing. For C++, it blows away anything else I've tried in more than 10 years. It gives real-time cross referencing and context information on the body of source, without having to compile it first (so it's great for exploring someone else's code).

        The macro ability is rather weak, but it was enough to customize the keys a bit. If you look at that link, the pane on the left shows all the functions, variables, and whatnot in the file. The thing at the bottom tells you things based on what's under the cursor, looking at all your source.

        —John

      Did I say anywhere you need to call wperl.exe from your editor macros? And even if I did, wouldn't you be able to grasp the concept of not copying the w?

      -- Abigail

        Why must you be so abrasive, if not outright rude, in so many of your posts over the last week or so?

        I'm not trying to escelate this, and I only will mention it this once. But being this is a friendly, chummy, group, could I politly point out that you're being a bit, well, offensive?

        —John