On 2009-Oct-10, at 11:16 am, pugs-comm...@feather.perl6.nl wrote:
+(However, statement control C<if> notices this and passes no argument,+so C<$_> ends up being bound to the outer C<$_> anyway.)
If "if" will specially handle this case, why not do likewise for @_ or %_ and avoid this problem:
+ sub say-or-print { + if $SAYIT { + say @_; # WRONG + } + else { + print @_; # WRONG + } + }
Or am I merely not yet used to situations where you'd want @_ to grab args passed in by "if"?
-David