Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Use of uninitialised value... but it is defined ?!

by Discipulus (Canon)
on Mar 02, 2016 at 08:19 UTC ( [id://1156622]=note: print w/replies, xml ) Need Help??


in reply to Re: Use of uninitialised value... but it is defined ?!
in thread Use of uninitialised value... but it is defined ?!

clear and neat explication, as always AnomalousMonk

this kind of problems happened to me too some time (years?) ago until i realized the right order.

my $variable = 'value'; ----------- ---------- | 1 | 3 BEGIN{ say $variable} --------------------- | 2

As the OP reveals, the compiletime runtime order implication is not so easely intellegible from docs: maybe is worth to put a note in perlmod where BEGIN block is described (well i do not understand why it is here, anyway; a separtate tutorial about the phases of the Perl process would not be better?).

The OP can profits the read of some stuffs about the matter:

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^3: Use of uninitialised value... but it is defined ?!
by AnomalousMonk (Archbishop) on Mar 02, 2016 at 17:27 UTC
    this kind of problems happened to me too ...

    You and me both, brother. And thank you for the compliment.


    Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-24 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found