in reply to scalar vs list context
From perldata under the heading 'List value constructors':
In a context not requiring a list value, the value of what appears to be a list literal is simply the value of the final element, as with the C comma operator. For example,
@foo = ('cc', '-E', $bar);assigns the entire list value to array @foo, but
$foo = ('cc', '-E', $bar);assigns the value of variable $bar to the scalar variable $foo.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|