On Tue, Jun 26, 2012 at 7:44 AM, demerphq <demerphq@gmail.com> wrote: > but should it really allow: > > printf "%d", my(), my(), my(), my(), my $x=10, my(); > I'm not sure what argument you're making, but it appears to be an appeal to aesthetics. If so, the argument equally applies to printf "%d", do{}, do{}, do{}, do{}, $x=10, do{}; which we're not going to change, so that leaves me answering "yes, that's not a reason for forbidding my()". On the other hand, arguments about consistency are not very convincing. my is very particular (i.e. exceptional) as to what it accepts as arguments. $ perl -e'my ( $foo{x} )' Can't declare hash element in "my" at -e line 1, at EOF Execution of -e aborted due to compilation errors. So preventing C<< my () >> can catch errors (as it did in the code generator that was mentioned). The question is: Can it also prevent legitimate code? I actually came up for a use for C<< my () >>: Self documenting lack of arguments. sub foo { my () = @_; ... } - EricThread Previous | Thread Next