[Israel.pm] Symbol table question

ynon perek ynonperek at gmail.com
Tue Aug 13 22:01:47 PDT 2013


Hi All,

I recently tried some symbol table manipulations and encountered the
following:

This code works:
$main::{foo} = sub { warn 'M::Foo' };
foo();

But this one doesn't:
BEGIN {
  $main::{foo} = sub { warn 'M::Foo' };
}
foo();

Why ?

-- 

כותב הרצאות ? מדבר מול קהל ? הבלוג שלי לומד
לדבר<http://publicspeakr.blogspot.com/>כתוב במיוחד בשבילך.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20130814/8c5737c6/attachment.htm 


More information about the Perl mailing list