in reply to returning scalar context from map or grep

Is there a way to turn the list context returned by map and grep into a scalar context?
Yes, by forcing scalar context or using the scalar() function, but seeing as how that's not what you want, an array slice will just have to do
perl -le 'print +(grep /\d/, qw/foo b4r b4z quux/)[0]' b4r
See. perldata for more info on slicing.
HTH

_________
broquaint