$ perl -wE 'my $s = "foo 123"; $s =~ /\d+/; say ${^PREMATCH}' foo
In reply to Re^4: ${^MATCH} regex special variable(s) and /p regex modifier
by lidden
in thread ${^MATCH} regex special variable(s) and /p regex modifier
by AnomalousMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |