valavanp has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: text editor in perl.
by GrandFather (Saint) on Jun 21, 2006 at 02:24 UTC

      A long time ago I ran across mention of an editor as a perl one-liner. (It may have been here-I honestly can't recall.) The code went (line broken for readability here):

      perl -MTk -MTk::TextUndo \ -e "(tkinit)->Scrolled('TextUndo')->pack; MainLoop"

      (By the way, if anyone might know the original attribution for that bit of code, please let me know-I've found it quite useful from time to time, and would love to direct credit where it is due.)

      Update: (21 Jun 2006) A trip to the a good search managed to find a mention of the code above dating from a 2002 thread on editing large text files, which could very well have been where I might have first encountered it.

Re: text editor in perl.
by jdtoronto (Prior) on Jun 21, 2006 at 05:32 UTC
    The sample editor provided by Nick Ing-Simmons on the Tk distribution is anything but a mere sample. It is a pretty complete editor that has drag-and-drop capability. It is also a good tutorial in its own right on how to code a complete Perl/Tk application including building mega-widgets.

    jdtoronto

Re: text editor in perl.
by pKai (Priest) on Jun 21, 2006 at 06:38 UTC
    I want to create an text editor in perl. Is there any way of doing it?

    Sure, it has been done before.

    That one is under GPL, source available. So you have ample opportunity to study how it can be done.

Re: text editor in perl.
by shonorio (Hermit) on Jun 21, 2006 at 02:26 UTC
    Take a look at CPAN Search and you will find many scripts that do your homework.

    Solli Moreira Honorio
    Sao Paulo - Brazil