do is a keyword (like package or use), not a function.
In your case, print is treated as a bareword . Surely this would not be surprising if you typed
use print;
instead :-)
I presume that Perl behaves in this way because it's more useful for the programmer, being more concise.
Also rememeber that if it looks like a function call, it is a function call.
-- TMTOWTDI
In reply to Re: The Behavior of 'do'
by trantor
in thread The Behavior of 'do'
by dsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |