Re: naming subroutine reference parameter?



Jeff Pan wrote:
>>>my (%hash,@array);
>>>&sub_test(\%hash,\@array);
>>
>>& has special meaning so it should be dropped when not needing
>>particular special behavior.
>
>
> I can't understand for this,can u give me some examples?

perldoc perlsub
--
&NAME(LIST); # Circumvent prototypes.
&NAME; # Makes current @_ visible to called subroutine.

Use "&" only when you want described side effects.
.



Relevant Pages


Loading