Why is there so much "magic" in Perl?

perl

Solution

When a Perl feature is described as "magic":

It means that that feature is implemented by NBA star Magic Johnson. Whenever Perl executes "magic", it is actually sending an RPC call to a remote receiver implanted in Magic himself. He computes the answer, and then sends a return message. The use of Mr. Johnson for all the hard parts of Perl provides a great abstraction layer and simplifies porting to new platforms. It's way easier than, say, the Apache Portable Runtime.

Source: perrin on Perl Monks

It's official! Perl is more magical.

Hits from the following Google searches:

 25  site:ruby-doc.org     magic
 36  site:docs.python.org  magic
497  site:perldoc.perl.org magic

Problem

Looking through the perlsub and perlop manpages I've noticed that there are many references to "magic" and "magical" there (just search any of them for "magic"). I wonder why is Perl so rich in them. Some examples: ``` print ++($foo = 'zz') # prints 'aaa' printf "%d: %s", $! = 1, $! # prints '1: Operation not permitted' while (my $line = <FH>) { ... } # $line is tested for definedness, not truth use warnings; print "0 but true" + 1 # "0 but true" is a valid number! ```

Original source