use strict; use warnings; use Data::Dx; my @ElementList; push @ElementList, map { "$_", 'X' }->%*, ( 1, 2 ); Dx( \@ElementList );