Perl: the Markov chain saw | |
PerlMonks |
Re^3: Reference madnessby Athanasius (Archbishop) |
on Jul 31, 2017 at 13:39 UTC ( [id://1196360]=note: print w/replies, xml ) | Need Help?? |
Hello sdani, I would say it's a quite unexpected behaviour..., because when I dump \@say, it prints out the expected results... That’s because Data::Dumper (like Data::Dump) applies a dereferencing operation to its argument if that argument is a reference. This is usually what you want; but to avoid it, just print the variable instead:
Note the square brackets in the output from Data::Dumper: they denote an anonymous array reference. See perlreftut. Hope that helps,
In Section
Seekers of Perl Wisdom
|
|