in reply to Re^4: matching POD footnote
in thread matching POD footnote

I think the anonymous monk was wanting you to think in more detail about what the following does:

s/$Npod/$N$1$n/s for @file;

You might write that in longhand as:

foreach my $line (@file) { $line =~ s/$Npod/$N$1$n/s; }

In other words, it's acting on one line at a time. The only pod footnote in your example input was split over multiple lines.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Replies are listed 'Best First'.
Re^6: matching POD footnote
by anek77713 (Acolyte) on Jul 18, 2013 at 09:07 UTC
    Every footnote starts with N< and ends with .>

    may be substitute them one at a time ?

      Every footnote starts with N< and ends with .> may be substitute them one at a time ?

      No. Start by slurping the entire file into a scalar (not an array; probably what your teacher is trying to teach you)

        thnx!)