in reply to Re: regexp list return 5.6 vs 5.8
in thread regexp list return 5.6 vs 5.8

What do you mean exactly? What kind of "array-specific" behavior are you trying to avoid? If you want to take data you are creating as a list but apply it in scalar context, you need to make some decision for yourself about what data you want and code accordingly. For example, map operates on a list and returns a list. If you want to use that in scalar context, and want something other than the length of the list as the value, you need to decide what you want. If you always want the last value, one way to do that is
my $scalar = (map { some code } some list)[-1];