Still I think it is weird that the argument $2 is passed to the procedure call rather than the value of $2. I would have expected this when using $!2 or $ $+ 2. In example I would have expected: $regsubex($1,/(a)/g, [ $2 ] )
identifiers are delay-eval'd in $regsubex so that things like $nick(\1, \2) work properly, so the [ $2 ] behaviour cannot be implicit. But, as you just pointed out, using [ $2 ] is a fine way to properly pass the $2 you expect.
- argv on EFnet #mIRC - "Life is a pointer to an integer without a cast"