in reply to Re^5: Why? (each...)
in thread Why? (each...)
where parens often indicate to the reader that he is looking at a list.
You say foreach (), I say while () and if ().
You say my ($x,$y,$z) = @_;, I say ($x+$y+$z)*$n.
The parens in foreach(),
The parens of foreach not even part of the expression, and the list is still created when you omit them.
say foreach "a", "b";
Or to put it differently, they indicate it's not an array and not a hash (and not a scalar).
Really?
$s = ($x); %h = ($x); %h = ([]);
Your model has too many holes to count :(
Simple model: A list is created whenever something is evaluated in list context.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Why? (each...)
by LanX (Saint) on May 13, 2011 at 00:06 UTC | |
by ikegami (Patriarch) on May 13, 2011 at 00:13 UTC | |
by Argel (Prior) on May 13, 2011 at 18:37 UTC | |
by ikegami (Patriarch) on May 13, 2011 at 19:32 UTC | |
by Argel (Prior) on May 14, 2011 at 00:12 UTC | |
|