in reply to Re^3: ${^MATCH} regex special variable(s) and /p regex modifierin thread ${^MATCH} regex special variable(s) and /p regex modifier
$ perl -wE 'my $s = "foo 123"; $s =~ /\d+/; say ${^PREMATCH}' foo [download]