What is the difference between perl and Perl?

Sometimes the naming of the Perl programming language is written with a capital letter Perl, and sometimes you can meet the word perl written in lowercase letters.

Sometimes it's lay meaning. The word Perl capitalized means the language programming, and word perl refers to the Perl interpreter, the program that launch in the console.

There is another curious phrase "only perl can parse Perl" "only the perl interpreter can to read the code on the Perl programming language".

There's another joke answer to this question. The difference between perl and Perl — one bit. Indeed, if you look at the binary representation of the bytes that make up line perl and Perl, that differs by only one bit. Here is a small program that shows bits of which are the lines:

▶ Run
#!/usr/bin/perl

use strict;
use warnings;

foreach my $word (qw(perl Perl)) {
    print $word . ' 'x4;
    foreach my $char (split //, $word) {
        my $num = ord($char);
        printf '%08b ', $num;
    }
    print "\n";
}

Here is the output from this program:

perl    01110000 01100101 01110010 01101100
Perl    01010000 01100101 01110010 01101100

Other articles

Comments