What is the different between putting arguments when calling subroutines vs a blank subroutine call?
&example($1,$2,etc..); vs &example;
Why do you need to pass arguments when calling a subroutine when you can call/use them inside the subroutine without passing them first.
ex:
$xyz = 15;
&example;
sub example {
$a = $xyz + 49;
print $xyz;
print $a;}
what am I not getting, not understanding about the syntax? Thank you for any response.
In reply to subroutine syntax by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |