On Fri, 23 Sept 2022 at 10:53, Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> wrote: > > Thanks for the quick turn-around, this looks good to me in this form. Thanks for reviewing. > Now, having written and looked at this with fresh eyes this would be an > even better & more logical thing to do: > open I, '<', "$name.txt" or die "No such file $name.txt"; > while (<I>) { > - if (/^(?:git|scalar)[a-z0-9-]*\(([0-9])\)$/) { > + if (/^\Q$name\E\(([0-9])\)$/) { > $mansection = $1; > next; > } Right, we know what we want there, so this does look reasonable. > Anyway, this is more than good enough for now, thanks! There's also much > bigger issues with the script, and we can leave that all aside from now > (e.g. if it dies the Makefile doesn't report an error, ouch!). Martin