in reply to Re^2: Questions on sort
in thread Questions on sort
The original code didn't use say, though. It used something that placed the expression scalar context, and there it makes a difference.
>perl -E"say(scalar( 'abc234def' =~ /(\d+)/ ));" 1 >perl -E"say(scalar( ('abc234def' =~ /(\d+)/)[0] ));" 234
|
|---|