my $stuff; BEGIN { ... ... ... ... Some complex code to initialize $stuff. ... ... ... }