in reply to Re: Re: value returned on m// failure
in thread value returned on m// failure

Let me show you a piece of code first:
$_ = 123; print 1 + m/^\d+$/, "\n"; # get 2 print "1" . m/^\d+$/, "\n"; #get 11
What does this piece of code tell us? It clearly tells us that, it is meaningless to ask the question whether m// returned a string or a number. The answer is only meaningful, when you use the returned value for a PURPOSE, either as a number, or as a string.

This is the flexibility we get from Perl.

Something not related, yet related:

Before you look at it, the Schrodinger's cat is both dead and alive. Dead or alive only becomes determined after you looked at the cat.