you do not need to pre-declare your subroutines like you do in C for instance.
Nitpick: You do in the case of the OP's code, because otherwise Perl will complain "main::base_code() called too early to check prototype" and the code won't work (because Perl doesn't know to take a reference to %codes as the argument). In general, if a sub has a prototype, Perl needs to see its declaration before it is called. But of course I agree with the advice to not use a prototype in the first place, in which case the issue becomes moot :-)
In reply to Re^2: printing complex data structures
by haukex
in thread printing complex data structures
by ic23oluk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |