This is an example of a one character wonder. That's a program which is absolutely correct except for one misplaced character.


use strict;

use warnings;

print "Hello World/n";

Source code

Hint 1: What you see is what you get.

Hint 2: What you see is what you get -- literally.

Hint 3: If you see 13 characters between then double quotes, then 13 characters are printed.

Hint 4: There is no escape character in the string.

Answer: The statement:

print "Hello World/n";
prints "Hello World" a forward slash and a "n". What the programmer should have written was:
print "Hello World\n";

Main gallery