previous | start | next

Question 4

What is the output of the following Perl program?

$p1 = "prog1.java";

$p1 =~ s/(.*)\.java/$1.cpp/;

print "$p1\n";



previous | start | next