A Perl program does not care about whitespaces. Following program works perfectly fine −
#!/usr/bin/perl print "Hello, world\n";
But if spaces are inside the quoted strings, then they would be printed as is. For example −
#!/usr/bin/perl # This would print with a line break in the middle print "Hello world\n";
This will produce the following result −
All types of whitespace like spaces, tabs, newlines, etc. are equivalent to the interpreter when they are used outside of the quotes. A line containing only whitespace, possibly with a comment, is known as a blank line, and Perl totally ignores it.