Hello,
On 09/07/2013 02:15 PM, Dr.Ruud wrote:
On 07/09/2013 13:43, Karol Bujaček wrote:
print Dumper(@_); # just look how the @_ looks like
Consider: print Dumper( \@_ );
I chose Data::Dumper::Simple
<http://search.cpan.org/~ovid/Data-Dumper-Simple-0.11/lib/Data/Dumper/Simple.pm>
which has such sentence in the documentation: ‘Note that there's no need
to even take a reference to the variables.’ Therefore I expected that
filters used in the D::D::S uses references somehow automatically. Is
this guess wrong?
my($animals, $digits) = @_;
my @animals = @$animals; # dereference
my @digits = @$digits; # dereference
The comment is inaccurate.
Why would you want to copy the arrays?
Because I don't want to change an array by my subroutine, as Shawn H
Corey answered already.
Well, this may or may not be eventual's intention, apt remark.
Best regards,
Karol
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/