First off $9YT isn't a valid valiable name. Variables can start with letters and underscores only. Using Data::Dumper should get almost what you want. There are no my's and i'm not sure how to get them, or if it is even possible with Data::Dumper.
use strict; use warnings; use Data::Dumper; my $ER = 34; my $YT = 44; my $EE = 66; print Data::Dumper->Dump([$ER, $YT, $EE], [qw(ER YT EE)]); __OUTPUT__ $ER = 34; $YT = 44; $EE = 66;