in reply to Re: eval('__PACKAGE__') is always main?!!!
in thread eval('__PACKAGE__') is always main?!!!
You made a classic shell quoting error - use double quotes for the internal quotes:
perl -le 'package foo ;print eval("__PACKAGE__");'
or, when your shell only gives you one flavour of quote, use Perls superior quoting facilities:
perl -le 'package foo ;print eval(q(__PACKAGE__));'
In Section
Seekers of Perl Wisdom