Skip to content

Commit d11c3f7

Browse files
committed
Use $1 rather than \1 to refer to regex matching group
At least Perl 5.26 prints a warning each time; some quick Googling suggests that \n should be used on the *left* of a match-and-replace to refer to an earlier match, and $n should be used on the right, though \n is acceptable for historical reasons.
1 parent 7eb2862 commit d11c3f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regression/test.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ($$$$$$$$$$)
7474
foreach my $key (@keys) {
7575
my $value = $defines->{$key};
7676
$options =~ s/(\$$key$|\$$key )/$value /g;
77-
$options =~ s/\$$key([:;])/$value\1/g; # Variables in --classpath are separated by (semi)colons
77+
$options =~ s/\$$key([:;])/$value$1/g; # Variables in --classpath are separated by (semi)colons
7878
}
7979
if (scalar @keys) {
8080
foreach my $word (split(/\s/, $options)) {

0 commit comments

Comments
 (0)