use Data::Dumper; my $a = 'hello'; my @foo = qw(1 2 3); my %bar = (this => 'that', one => 'un'); print Data::Dumper->Dump( [$a, \@foo, \%bar], [qw/$a *foo *bar/] );