in reply to Why is "odd number of elements in hash assignment" warning and not error?
a function returning nothing (not undef) in list context;
I don't get this point. I take it to mean the assignment of an empty list to a hash, but none of the circumstances that I can think of that involve such an assignment elicit any warning, nor should they IMHO: an empty hash is a valid hash.
Can you expand a bit on this point?c:\@Work\Perl\monks>perl -wMstrict -le "my %hash; my %hasi = (); my %hasj = empty_list(); ;; print scalar keys %hasj; ;; sub empty_list { return; } " 0
Give a man a fish: <%-(-(-(-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why is "odd number of elements in hash assignment" warning and not error?
by Dallaylaen (Chaplain) on Feb 18, 2015 at 18:20 UTC | |
|
Re^2: Why is "odd number of elements in hash assignment" warning and not error?
by Anonymous Monk on Feb 18, 2015 at 18:06 UTC |