in reply to subroutines and namespace
This is bad because getting the information to the subroutine requires that you correctly name the variables in the enclosing scope and there is no way to catch mistakes.
It is also bad to have the subroutine tell the caller what variable names to use. What if I want to write some code that uses your subroutine twice? I can't have two different variables both called $ref_booking!
- tye (but my friends call me "Tye")
|
|---|