| Learn | Perl - Lists - Lists can be passed into subroutines |
|---|
| Lists can be passed into subroutines As to pass list into a subroutine, you specify the subroutine's name and then supply the list to it: Internally Perl makes aliases to those arguments and put them into the array You access subroutine arguments like this: Aliasing gives you the ability to change the original value of argument passed to subroutine: To prevent inadvertent changes of original values passed into your subroutine, you should copy them: To test how many arguments were passed into the subroutine, check the size of If you pass array arguments into a subroutine they all will be flattened: If your |
Read Article
https://develop.horje.com/learn/1434/reference