Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^5: how to make this perl code run

by LanX (Chancellor)
on May 16, 2013 at 21:38 UTC ( #1033913=note: print w/ replies, xml ) Need Help??

in reply to Re^4: how to make this perl code run
in thread how to make this perl code run

> This untested code should work ...

And you think none of us tested this already and we all were too modest to post a code that works???


The parser needs to see the declaration before it parses the barewords.

BEGIN-blocks don't change the parsing order, only the runtime order!

Cheers Rolf

( addicted to the Perl Programming Language)


to be precise BEGIN-Block are run at parsing time, but the parsing order doesn't change. see perlmod

Comment on Re^5: how to make this perl code run
Replies are listed 'Best First'.
Re^6: how to make this perl code run
by Anonymous Monk on May 16, 2013 at 22:13 UTC

    Of course (about everybody being modest:>).

    In any case this did remind me of the reason to generate subs in BEGIN block near the very start of a module.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033913]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-11-25 03:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (670 votes), past polls