[Pdx-pm] any one know of an editor that allows for embeded perl?

Ben Prew ben.prew at gmail.com
Wed Nov 16 23:13:05 PST 2005

Rather then just blather on about the theoretical uses of some theoretical
text editor, there's an article on how to customize emacs in perl:


Also, I would recommend looking up narrowing and widening in the emacs elisp


And, the elisp reference has information on "the region", which is the text
between the point and the mark... or, the currently selected text:


Ultimately, just about anything you can do in Perl can probably be done
better in elisp... except for expressing a regular expression, its very
similar to Python or Java :(. See Ahh, the Regexes for what I'm talking


And, along that same vein, if you're thinking about learning elisp, here's a
translation of common perl idioms to elisp:


I don't know how well they map to good "lisp-style", but they appear to be
pretty good.

Finally, I must say that even though I prefer emacs, Vim can be compiled
with Perl support built-in, so you can use it directly in your vim scripts,
and don't have to shell out to Perl.

Unfortunately, I don't have much experience with that, so you'll have to ask
someone else about it :).

On 11/14/05, benh <ben.hengst at gmail.com> wrote:
> Ok I've been beating my head on this one. Any one know if there is an
> editor that embeds perl in to the editor? Kinda like a super fancy
> copy/paste/search/replace .... I currently use jEdit and love it...
> well for the most part. Heres an example of something that I just got
> done doing, build a nav with every image in a dir nav_cat* files are
> categorys and nav_*_* are links
> ls -lh *.gif > list
> [open list in jEdit]
> using regex find s/^.*14:(49|50)//
> [copy trim list to new buffer]
> my @imglist = ( ** list here ** );
> my $cat=q{};
> foreach (@imglist) {
> if(m/^nav_cat/) {
> ($cat)= $_ =~ m/nav_cat_(.*?).gif/;
> print "<tr><th><img src='$_' alt='$cat'></th></tr>\n";
> }
> else{
> my ($alt)= $_ =~ m/nav_.*?_(.*?).gif/;
> print "<img src='$_' alt='A link to $alt $cat'></a>\n";
> }
> }
> [save that off and run script in term... copy output]
> [open new buffer in jEdit ... paste]
> take a seperate list of the actual links that have the category id's
> and link them up by hand...
> and tada... final table of links.... total time about 15 minutes, much
> faster then doing it all long hand like most of the production folks
> but ... it got me thinking... why am I bouncing back and forth and
> side steping STD(IN|OUT) ... what I would love to see is an editor
> that could fork a background process as a perlscript and plug in
> STDOUT in to the buffer... almost like bluring the lines between
> terminal and editor? Is that possible... well I'm sure that any emacs
> guru would yell at me because emacs is the answer to everything... any
> takers on this one?
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list

Ben Prew
ben.prew at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20051117/12a8dad1/attachment.html

More information about the Pdx-pm-list mailing list