in reply to Re: Spotting an empty array as argument
in thread Spotting an empty array as argument
DB<262> sub mysay (;+@) { print @_ } DB<263> mysay 1,2,3 123 DB<264> mysay 1..3 DB<265> mysay 1..3,4..6 456 DB<268>
It's enforcing scalar context on the first argument, and this is one of the unfortunate cases where an operator is changing it's meaning on context. :(
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Spotting an empty array as argument
by haukex (Archbishop) on Mar 26, 2021 at 22:41 UTC |