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

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.

Replies are listed 'Best First'.
(ichimunki) Re: Religious Matters and Text Editing
by ichimunki (Priest) on Jul 05, 2001 at 07:15 UTC
    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

        The DOS shell mode works pretty much as advertised (i.e. seems to be a DOS version of the Unix shell mode), which means you get full cut-and-paste, simple command replay, the ability to do searches (regex searches no less) on sessions/buffers, tab-completion, and probably a few other things. I haven't used shell mode on Unix much myself-- finding it easier to open xterms in separate windows, one for the editor, one for the CLI.

        I should also point out that the directory editor mode in emacs is also pretty much unchanged in the DOS/Windows port-- which may not be as pretty as the Windows explorer, but offers all the same features as the unix version-- which I've heard includes multifile search & replace and other handy things like that.

        Again, I myself am not a power-emacs-user yet, just a wide-eyed convert. Now what I'd really like to see is a stripped down (no email, news-reader, Eliza games-- yes, the editor does Eliza), all-Perl version of emacs running in Tk. :)
Re: QuickPerl: a step up from -e
by Abigail (Deacon) on Jul 05, 2001 at 09:48 UTC
    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

        Relax, John, I have a theory for you.

        Since I have been on PerlMonks I've seen many different personality types, and enjoyed meeting every one of them (although in some cases the enjoyment has dissipated :P). I find there are a few people within the community who adopt a certain terseness to their posts, and IMHO this is not necessarily a bad thing. It's nice to get a reply from someone that is succinct, to the point, and also lets you know where you're going wrong.

        Some posts are slightly more, uhm, incisive than others, but that is the beauty of our diverse culture. A few of the more respected (knowledge-wise) monks like to come across with the "I don't really have the time to answer your question, so I'll be a bit naughty in my answer" approach. This is not a bad thing. Everyone needs a yin and a yang. I personally would be pretty bored if every reply to a node was obsequious.

        Azatoth a.k.a Captain Whiplash

        Make Your Die Messages Full of Wisdom!
        Get YOUR PerlMonks Stagename here!
        Want to speak like a Londoner?