http://qs1969.pair.com?node_id=253667

!unlike has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,
Is there a way to turn the list context returned by map and grep into a scalar context?

By that I mean I wish to have either only the first or only value returned in scalar context and not the size of the list.

I've had several stabs at it and have had no success other than using an array placeholder. If I would like to do it inline with the map/grep as it looks neater.

!unlike

I write my Perl code like how I like my sex: fast and dirty. ;)