Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
WHY?@an_array=(1,2,3,4,5,6,7); &routine(\@an_array); sub routine { $ref=$_[0]; print @$ref; # That works # print (@($_[0])); # This would produce a compilation error! print @$_[0]; # And this doesn´t print anything! }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dereferencing Subroutine Arguments
by merlyn (Sage) on May 17, 2000 at 20:16 UTC | |
|
Re: Dereferencing Subroutine Arguments
by davorg (Chancellor) on Jun 21, 2000 at 12:47 UTC |