On 23 Sep, 00:10, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
>
> "use subs" doesn't seem to work on defined(). OTOH, you can call the
> function with the ampersand or with a fully qualified name.
>
>      &defined();
>
>      main::defined();

This is true but not really very useful. The real reason to define
subroutines that happen to have the same name as built-in functions is
so that they can be called as methods.

ISTR that a recent version of Perl introduces weak built-in functions.
These _can_ be overridden simply by declaring a subroutine of the same
name. This is, of course, an ugly hack to add reserved words to the
language without breaking existing code.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to