in reply to There's scalar(), but no list(). Perl could need one for rare but reasonable use
Another way (perl 5.14+):