sub f {a => 1, b=>2} my %h = (c => 3); say keys %h, f(); #output: c
This is definitely also wrong, say will print the list from f()
D:\>perl -Mfeature=say sub f {a => 1, b=>2} my %h = (c => 3); say keys %h, f(); __END__ ca1b2 D:\>
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^10: Using 'keys' on a list (update x2)
by LanX
in thread Using 'keys' on a list
by lammey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |