What is the output of the following Perl program?

Q

What is the output of the following Perl program?
1 $p1 = "prog1.java";
2 $p1 =~ s/(.*)\.java/$1.cpp/;
3 print "$p1\n";

✍: Guest

A

prog1.cpp

2013-08-30, 1699👍, 0💬