On Wednesday 28 November 2007 04:14, Jeff Pang wrote:
>
> for (keys %::) {
>     print "$_ -> $::{$_}\n" if /abc/;
> }
>
> __END__
>
> the output is:
> abcee -> *main::abcee
> abc -> *main::abc
>
> that's to say, when you say $f2 = \&abcee you have created an entry
> in this script's symbol table.

Correct.

> so, abcee can be anything (a hash, an
> array, a scalar, a subroutine, a handler etc).

No, it is assigning a code reference so only the *main::abcee{CODE} 
slot in the symbol table will be in use.

If you had said:

use vars '*abcee';

then abcee could be anything.




John
-- 
use Perl;
program
fulfillment

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


Reply via email to