in reply to Data::Dumper print arrays of scalars on one line
Not exactly what you want, but maybe Data::Dump is closer to your liking:
use strict; use warnings; use Data::Dump qw(dump); my $data = { 'hk1' => 5, 'hk2' => [ [21], [100, 101, 102, 103, 104, 120, 23] ] }; print dump($data), "\n"; push @{$data->{hk2}[0]}, "01" .. "10"; print dump($data);
Prints:
{ hk1 => 5, hk2 => [[21], [100 .. 104, 120, 23]] } { hk1 => 5, hk2 => [ [21, "01", "02", "03", "04", "05", "06", "07", "08", "09", +10], [100 .. 104, 120, 23], ], }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Data::Dumper print arrays of scalars on one line
by Danny (Chaplain) on Jun 20, 2024 at 14:31 UTC |