in reply to dereferencing array in a subroutine
... my @sample=qw(a b c); trial(\@sample); sub trial { my ($sample) = @_; print join("\t",@$sample); }
This would assign the array reference passed to the routine to the reference $sample (a local lexical scalar variable), which you can then dereference to an array using @$sample.
|
|---|