in reply to Re: Re: value returned on m// failure
in thread value returned on m// failure
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.$_ = 123; print 1 + m/^\d+$/, "\n"; # get 2 print "1" . m/^\d+$/, "\n"; #get 11
|
|---|