use strict; my $a = 1; change($a); print "a is now: $a\n"; not_change($a); print "a is now: $a\n"; sub change{ ++$_[0]; } sub not_change{ my $b = shift; ++$b; } __OUTPUT__ a is now: 2 a is now: 2
In reply to Re: Subroutines: @_ and shift
by johnnywang
in thread Subroutines: @_ and shift
by ghenry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |