"B. Fongo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello
>
> An argument passed to a subroutine returns wrong value.
>
> Code example:
>
> @x = (1..5);
> $x = @x;
>
here, $x gets the number of elements in @x
>
> showValue ($x); # or showValue (\$x);
>
>
> sub showValue {
>
> my $forwarded = @_;
>
$forwarded gets the number of elements in @_
>
> print $forwarded; # print ${$forwarded};
>
> }
>
> In both cases, the script prints out 1.
> What is going on here?
>
What do you expect to happen? What _is_ happening is exactly what is
supposed to.
Todd W.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]