in reply to Marcos' Meditation

how about this one-liner:

perl -ne 'print unless /^<!-- inserted banner -->$/i .. /^<!-- end of inserted banner -->$/i'

it should work as long as the delimiters are consistent. if not, the regexps can be enhanced slightly to accomodate some variety.

Replies are listed 'Best First'.
RE: RE: Marcos' Meditation
by marcos (Scribe) on May 29, 2000 at 20:33 UTC
    You are right! And your solution is indeed much more elegant: I like it! I didn't know that the .. operator could be used in a scalar context in this way: now I've read again the perlop manpage and I understand the .. flip-flop like behavior :-) Thank you very much for your suggestion. Anyway I still need the -i switch to have the files edited in-place, and I still need the File::Find stuff to traverse the whole directory tree.