in reply to Re^4: why doesn't "my ($a,$b)" return a list?
in thread why doesn't "my ($a,$b)" return a list?
Well, my behaves different in several aspect to other buildins.
A lot of builtins have unique parsing rules. (print, map, sort, system, our, ...) And?
It also doesn't flatten its argument list.
I don't see how you could pass something that could be flattened.
I find consider my to behave like a sub quite a stretch of my imagination.
Sure, typically my is typically used as a directive, but we're talking about using it inside an expression. I don't see any difference between
foo(bar(ARGS)); foo(my(ARGS));
Why do you think my should behave differently than bar?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: why doesn't "my ($a,$b)" return a list?
by LanX (Saint) on Aug 19, 2010 at 19:50 UTC | |
by ikegami (Patriarch) on Aug 19, 2010 at 20:26 UTC | |
by LanX (Saint) on Aug 19, 2010 at 21:02 UTC | |
by ikegami (Patriarch) on Aug 19, 2010 at 21:18 UTC | |
by LanX (Saint) on Aug 19, 2010 at 21:30 UTC | |
| |
|
Re^6: why doesn't "my ($a,$b)" return a list?
by JavaFan (Canon) on Aug 19, 2010 at 21:24 UTC | |
by ikegami (Patriarch) on Aug 19, 2010 at 21:58 UTC | |
by JavaFan (Canon) on Aug 20, 2010 at 08:22 UTC | |
by ikegami (Patriarch) on Aug 20, 2010 at 13:47 UTC |