Try this code instead:
use strict; use warnings; my ($i , $j); $i = 1; $j = $i - 1; sub bca{ $i = $i+1; $j = $j+1; } print "Before SUB call \$i=$i\n"; bca(); print "After SUB call \$i=$i\n";
"XML is like violence: if it doesn't solve your problem, use more."
In reply to Re: variable declaration
by NetWallah
in thread variable declaration
by Priti24
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |