|Think about Loose Coupling|
Re^3: wantarray alternativeby LanX (Chancellor)
|on Jul 10, 2013 at 19:53 UTC||Need Help??|
just return the list! In scalar context the last element is taken, so if you are only returning "one value in the return list" thats the same.
It's the scalar of an array(!) which counts.
ok not that easy, avoid scalar context and explicitly put the scalar into a list at LHS.
Though we asked several times you haven't clarified which result you expect in in case of scalar context and longer list!
( addicted to the Perl Programming Language)