I have a Perl file like this:
use strict; f1(); sub f3() { f2(); } sub f1() {} sub f2() {}
In short, f1 is called before it is d
f1
Simply remove the () from your subroutine definitions. When you define with (), Perl thinks these are prototypes and you have to define your prototype before you use it.
Try this......
use strict; f1(); sub f3 { f2(); } sub f1 {} sub f2 {}