esskar has asked for the wisdom of the Perl Monks concerning the following question:
works, reads the __DATA__ section in Foo and writes it to $foomy $foo = do { package Foo; local $/; <DATA>; };
does not work - probably because eval "package $bar" has its own scope.my $class = 'Bar'; my $bar = do { eval "package $bar"; local $/; <DATA>; };
Any ideas how i can solve my problem?
Back to
Seekers of Perl Wisdom