Keep It Simple, Stupid | |
PerlMonks |
Re: DANGER - was Re: Re: Syntax Error Checkingby OeufMayo (Curate) |
on Jan 02, 2001 at 14:46 UTC ( [id://49274]=note: print w/replies, xml ) | Need Help?? |
Too bad, true. But I still don't understand why it doesn't print the two other lines. In my Great Foolishness(tm), I had always thought that there could only be one BEGIN block by package. So as I was reading merlyn's answer to the question, I thought to myself: "Ah! easy! I just have to embed the eval'd block in another BEGIN block, to make sure it'll be evaluated first." Alas, the "you lose!" block was the first printed in the block and then the "hello/goodbye" lines. Mmmh, too bad. Then, I realized that anything outside the BEGIN block in the sub was not executed. What is happening exactly? Does a BEGIN code inside a sub never returns? Can someone point me a node where all these mysteries are unveiled? Thanks! <kbd>--PerlMonger::Paris(http => 'paris.pm.org');</kbd>
In Section
Seekers of Perl Wisdom
|
|