Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • There is some improvement to be made.

    /2CR         # (CR is return) search for the 2 (or some other way to get there)
    r1kr2        # change 2->1, up, change 1->2
    ddp          # delete 1'st line, append 1'st line after 2'nd

    The "r" is useful to change one character ("R" will overwrite a bunch of chars, it's like insert mode but overwrites).

    The "ddp" switches the current line with the next. It is a variant on the very useful (especiall

    • I found one aspect of vi that prepared me well for Larry's view of perl (that writing pidgin perl is a great way to start and should be tolerated, nay encouraged).

      I found that my initial use of vi was adequate, but that every 6 months or a year I would read through the vi manual and pick a few more useful idioms and add them to the set that I knew well enough to use without thinking. After a few years of this, my vi repertoire was large enough that most of the new idioms I tried to learn were not useful often enough - by the next time I had a good reason to use one of them, I had forgotten it - so that I wasn't learning much more. So I dropped it down to every few years I would reread the manual (like when a new vi-lookalike comes along - like vim).