I need to understand how stuff works otherwise I'll soon be asking the same things again and annoy you all.
AnonyMonk has given a pretty good explanation above, but you need to understand where to look stuff up. That way, you'll be able to answer your own questions when the time comes that everyone else is too busy or too annoyed to answer them for you.
... I thought Perl reads the script line by line from top to bottom. Now in this example we first use make_path and then set the subroutine. Shouldn't the subroutine be on top of everything else?
In Perl, a subroutine can, in most cases, be defined anywhere in the program and at any time (compile- or run-time) just as long as it is defined when it is actually called at runtime (see perlintro and perlsub). The only examples I can think of that require prior definition or declaration of a function involve prototypes — but don't involve yourself with prototypes unless you have to; see Far More than Everything You've Ever Wanted to Know about Prototypes in Perl -- by Tom Christiansen.
Give a man a fish: <%-{-{-{-<
In reply to Re^3: make_path for creating directory tree
by AnomalousMonk
in thread make_path for creating directory tree
by fasoli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |