http://www.perlmonks.org?node_id=1038346


in reply to declare/initialize variables at bottom of script?

If you're willing to foregoe strictness (not recommended), you could use globals and a BEGIN block:
no strict; no warnings; some_operation_on($abc); ... BEGIN { $abc = 'foo'; }
If you want to keep strictness, you have to declare them before their first use. Again, you could employ the BEGIN bock trick to assign their initial values at the end of the script.