in reply to Re: Spotting an empty array as argument
in thread Spotting an empty array as argument
I think you are confusing @ with \@ . The former will swallow the whole list
DB<40> sub my_say (;\@$$$) { dd \@_ } DB<41> my_say @a [["a1", "a2", "a3"]] DB<42> my_say @a,$a [["a1", "a2", "a3"], "A"] DB<43> sub tst (@) { dd @_ } DB<44> tst @a ("a1", "a2", "a3") DB<45> tst @a,2 ("a1", "a2", "a3", 2)
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 choroba (Cardinal) on Mar 25, 2021 at 22:11 UTC | |
by LanX (Saint) on Mar 25, 2021 at 22:25 UTC |