in reply to map BLOCK evaluation context
Nothing to do with map; it has more to do with precedence. The or operator always returns a scalar.
Consider:
print "D:"; for (qq{ab cd}) { print(/(\S+)/g or die); } print "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: map BLOCK evaluation context
by vsespb (Chaplain) on Mar 08, 2013 at 14:37 UTC | |
by tobyink (Canon) on Mar 08, 2013 at 14:50 UTC | |
by vsespb (Chaplain) on Mar 08, 2013 at 14:51 UTC | |
by Athanasius (Archbishop) on Mar 08, 2013 at 15:43 UTC | |
by vsespb (Chaplain) on Mar 08, 2013 at 16:09 UTC | |
|
Re^2: map BLOCK evaluation context
by ikegami (Patriarch) on Mar 09, 2013 at 18:43 UTC |