in reply to Re: nested #if directive matching matching
in thread nested #if directive matching matching

You probably don't want #else to increment $depth.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^3: nested #if directive matching matching
by choroba (Cardinal) on Jun 26, 2012 at 10:16 UTC
    Thanks, removed. I took it from the OP, and it is not present in the test data :-)

    BTW, /#if/ matches both /#ifdef/ and /#ifndef/...