in reply to The Behavior of 'do'
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: The Behavior of 'do'
by tomazos (Deacon) on Jul 27, 2001 at 01:05 UTC |