in reply to Re^3: Interpolation requires a spurious variable. Why?
in thread Interpolation requires a spurious variable. Why?
Update please disregard, I should have read more carefully...
It's cleaner because it also works when multiple elements are present:
use strict; use warnings; use 5.010; my ($a, $b) = (4, 5); say "@{ [$a // 2, $b] }"; # 4 5 say "@{\($a // 2, $b) }"; # Not an ARRAY reference at foo.pl l +ine 8.
The feature of \( LIST ) to return the same as map \$_, LIST is not always intuitive.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Interpolation requires a spurious variable. Why?
by ikegami (Patriarch) on Sep 24, 2009 at 14:13 UTC |