X
xyoavx
Hi,
I don't understand why the following program displays the above
mentioned error.
#!perl -w
sub total
{
foreach (@_)
{
$_[0]=7;
}
$_[0];
}
print &total(4,5,6,7),"\n";
Running.....
C:\perl-pro>p ex1-p71s
Modification of a read-only value attempted at ex1-p71s line 6.
Please help.
Thanks in advance,
xyoavx
I don't understand why the following program displays the above
mentioned error.
#!perl -w
sub total
{
foreach (@_)
{
$_[0]=7;
}
$_[0];
}
print &total(4,5,6,7),"\n";
Running.....
C:\perl-pro>p ex1-p71s
Modification of a read-only value attempted at ex1-p71s line 6.
Please help.
Thanks in advance,
xyoavx