DEVFYI - Developer Resource - FYI

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

Perl Questions and Answers


(Continued from previous question...)

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

(Continued on next question...)

Other Interview Questions