in reply to sub execution order aka missing semicolon after sub call
In your example code, Perl is seeing sub_B as the parameter to sub_A. Since the sub declarations came before the calls, parens are not needed as compiler clues, so it's perfectly legitimate syntax. Almost exactly the same as sub_A(sub_B()).
So for sub_A to be called, sub_B must first be called so that its return value can be passed as the parameter to sub_A.
Dave
|
|---|