in reply to Re^2: my (0?$a:$b): a koan
in thread my (0?$a:$b): a koan
it is surprising that it parses at all, since I thought "my" took a list of variables
I suspect that it takes any expression, then checks if the expression is valid.
>perl -e"my ( f($x, $y.) );" syntax error at -e line 1, near ".) " Execution of -e aborted due to compilation errors.
The catch here is that that constant folding happens before the check.
Another allowed expression:
>perl -e"my(my(my(my $sharona)))" >
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: my (0?$a:$b): a koan
by JavaFan (Canon) on May 05, 2011 at 16:58 UTC | |
by ikegami (Patriarch) on May 05, 2011 at 18:16 UTC | |
by ambrus (Abbot) on May 05, 2011 at 19:24 UTC | |
by mr_mischief (Monsignor) on May 06, 2011 at 06:16 UTC | |
by ikegami (Patriarch) on May 06, 2011 at 06:23 UTC | |
|