use strict; use warnings; use Data::Dumper qw( Dumper ); print Dumper [ select1 => 'Component_1_1', select1 => 'Component_1_2', select2 => 'Component_2_3', ]; #### >perl 710263.pl $VAR1 = [ 'select1', 'Component_1_1', 'select1', 'Component_1_2', 'select2', 'Component_2_3' ];