Edward Peschko wrote:
> How about 'an implicit parens around a set of statements separated by
commas
> in any context'? This is consistent
>
> $a, $b, $c = $d, $e, $f; # ($a, $b, $c) = ($d, $e, $f);
>
I guess this should be
$a, $b, ($c = $d), $e, $f
I think making `my' work just the same as `print' would be good. When you
want to my and assign an array of variables you would just
my($a, $b, $c) = @_;
or
(my $a, $b, $c) = @_;
The case
my $a, $b, $c = @_;
should be
my $a, $b, ($c = @_);
which for that case of @_=(1..10) should result in $c==3, which is the
expected.
Both ways are possible though.
- Branden
- Re: Closures and default lexical-scope for subs Nathan Wiger
- Re: Closures and default lexical-scope for subs Edward Peschko
- Re: Closures and default lexical-scope for subs Peter Scott
- Re: Closures and default lexical-scope for subs Edward Peschko
- Re: Closures and default lexical-scope for subs abigail
- Re: Closures and default lexical-scope for subs Nicholas Clark
- Re: Closures and default lexical-scope for subs Edward Peschko
- Re: Closures and default lexical-scope for subs abigail
- Re: Closures and default lexical-scope for subs Edward Peschko
- Re: Closures and default lexical-scope for subs abigail
- Re: Closures and default lexical-scope for subs Edward Peschko
- Re: Closures and default lexical-scope for subs Branden
- Re: Closures and default lexical-scope for subs Peter Scott
- Re: Closures and default lexical-scope for subs Branden
- Re: Closures and default lexical-scope for subs Bryan C . Warnock
- Re: Closures and default lexical-scope for subs Branden
- Re: Closures and default lexical-scope for subs Branden
- Re: Closures and default lexical-scope for subs Bryan C . Warnock
- Re: Closures and default lexical-scope for subs Branden
