in reply to Perl Command Help

perintro is a good place to learn. This might give you some ideas:
use warnings; use strict; while (<DATA>) { s/#sql/sql/ if $. > 2 and $. < 5; print; } __DATA__ #sql #sql #sql #sql #sql #sql #sql

Replies are listed 'Best First'.
Re^2: Perl Command Help
by choroba (Cardinal) on Dec 19, 2013 at 22:43 UTC
    Or even
    s/#sql/sql/ if 3 .. 4;
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ