Hi,
A subroutine's arguments come in via the special @_ array. The shift without an argument defaults to @_.
for example,
sub emp {
$name = shift;
$id = shift;
print "name, $name, id $id";
}
&emp('abc', 10);
In reply to Re: Using 'Shift' in subroutine argument
by sen
in thread Using 'Shift' in subroutine argument
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |