On Jun 24, Kevin Pfeiffer said:
>>> sed '/zone "domain.com" {/,/};/d' /etc/named.conf > newfile
>>>
>>> How might one do this in Perl?
>>
>> perl -ne 'print unless /zone "domain.com" {/ .. /};/' \
>> /etc/named.conf > newfile
>
>Cool, I didn't think of Perl's range operator "..".
Don't be fooled. Just because it looks like a duck doesn't mean it's a
duck. In this case, the .. operator is the flip-flop operator. In scalar
context, .. is flip-flop, while in list context, .. is range.
perldoc perlop
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]