If a subroutine is defined after it is called, the call has to use parenthesis.
Not quite. If a subroutine is declared after it is called, the call has to use parenthesis. You can always define it afterwards.
>perl -wle"sub foo; foo; sub foo { print 'Hi!' }" Hi!
Granted, it's very rare for a subroutine to be declared somewhere other than when it's being defined.
In reply to Re^4: Defining a sub within a sub: OK?
by ikegami
in thread Defining a sub within a sub: OK?
by talexb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |