BEGIN { my $var = do_some_processing(); } __BEGIN__ # start of real processing.. but the compiler has already processed the BEGIN block! # ..real code here..