Trihedralguy has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering why the interaction between Data::Dumper and printf is different between an array and an array as ref. See Example:
#!/usr/local/bin/perl use strict; use Data::Dumper; my @array = (1, 2, 3, 4); printf "As Array:\n"; printf Dumper(@array); printf "As Reference to Array:\n"; printf Dumper(\@array);
"print" doesnt seem to have any problems, "printf" doesnt seem to return the proper results...But I want to know why!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Data::Dumper and printf
by kennethk (Abbot) on Nov 20, 2012 at 22:52 UTC | |
by Anonymous Monk on Nov 21, 2012 at 05:50 UTC | |
by Trihedralguy (Pilgrim) on Nov 21, 2012 at 00:05 UTC | |
by LanX (Saint) on Nov 21, 2012 at 17:05 UTC | |
|
Re: Data::Dumper and printf
by ww (Archbishop) on Nov 20, 2012 at 22:51 UTC |