Slash Boxes
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.
More | Login | Reply
Loading... please wait.
  • I've seen the command in the manual but have never really used it. It sounds clever, but it's not something I ever felt I whish I could use.

    Can you give a few real-life (as in "actual") scenarios when it's useful to use narrow?


    • I think I typically use narrow for restricting the range of a search-and-replace.

      Example: I'm working on an HTML document and I want to paste in some Perl code or something. I type <pre>, paste the code, and </pre>, and then I realize I need to turn the &'s in the Perl code into &amp;'s. So I select the Perl code that I just pasted in, hit Narrow, use replace-string to change &'s to &amp;, and then hit Widen.