MCQs > IT & Programming > Perl > What will be the output of the Perl code? $_ = 'Mark is to the left of red window.'; if ( /\b(red)\s+(\w+)/i ) { print '$2 follows $1.\n'; }

Perl MCQs

What will be the output of the following Perl code?

  $_ = "Mark is to the left of red window.";

if ( /\b(red)\s+(\w+)/i ) {

    print "$2 follows $1.\n";

}


Answer

Correct Answer:

window follows red.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Perl Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Perl Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it