in reply to Re^3: print array of hashes
in thread print array of hashes

And scalar applied to a list returns the number of elements in the list.

That statement could be misleading...:

$num = scalar ( qw(foo bar) ); print $num; # "bar", not 2!

A list (as opposed to an array) in scalar context evaluates to its last element.