What is the output of the following perl - ProProfs Discuss
Topics
Products
Follow Us:

What is the output of the following perl code?
 #!/usr/bin/perl\r\nprint content-type: text/HTML \\n\\n;\r\n# SET A VARIABLE$count = 0;while ($count <= 7) {   if ($count == 4) {  print Skip Four!;  next; } # PRINT THE COUNTER print $count.;\r\n} continue {  $count++; };print Loop Finished!;



A. 1\r\n2\r\n3\r\nSkip Four\r\n5\r\n6\r\n7\r\nLoop Finished!
B. 1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\nLoop Finished!
C. 1\r\n2\r\n3\r\nSkip Four\r\n5\r\n6\r\n7\r\n
D. Error
This question is part of Perl Scripts assessment
Asked by centurians, Last updated: Mar 05, 2020

+ Answer
Request

2 Answers

John Adney

John Adney

Answered Jun 15, 2017

The output will be

0123Skip Four!567Loop Finished!

why 10 words?
 

John Smith

John Smith

Answered Jun 15, 2017

1 2 3 Skip Four 5 6 7 Loop Finished!
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.