Why is there so much "magic" in Perl?
Posted
by eugene y
on Stack Overflow
See other posts from Stack Overflow
or by eugene y
Published on 2010-02-17T23:06:54Z
Indexed on
2010/03/13
12:05 UTC
Read the original article
Hit count: 402
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
© Stack Overflow or respective owner