X
xyoavx
Hello,
I don't understand why the following program displays nothing, although
the meaning of the last calculation performed by the subroutine max
is:{$max_so_far=10;}
#!perl -w
$maximum=&max(3,5,10);
print $maximum,"\n";
sub max
{
my($max_so_far)=shift @_;
foreach (@_)
{
if ($_>$max_so_far)
{$max_so_far=$_;}
}
}
Thanks in advance,
xyoavx
I don't understand why the following program displays nothing, although
the meaning of the last calculation performed by the subroutine max
is:{$max_so_far=10;}
#!perl -w
$maximum=&max(3,5,10);
print $maximum,"\n";
sub max
{
my($max_so_far)=shift @_;
foreach (@_)
{
if ($_>$max_so_far)
{$max_so_far=$_;}
}
}
Thanks in advance,
xyoavx