previous | start

Question 4 answer

What is the output of the following Perl program?

    1   $p1 = "prog1.java";
    2   $p1 =~ s/(.*)\.java/$1.cpp/;
    3   print "$p1\n";



prog1.cpp



previous | start