Why is there so much "magic" in Perl?
- by eugene y
I'm looking through perlop and perlsub pages of the Perl manual. There are many references about "magic" and "magical" here (just search any of them for the "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'
use warnings; my $i; print $i++ # no warning for uninitialized value
while (my $line = <FH>) { ... } # $line is actually tested for definedness