- or download this
my %data;
$data{a} = 1;
...
map { "$_=$data{$_}" }
grep { $data{$_} }
sort keys %data;
- or download this
our $a = 1;
our $b = 2;
...
grep { $_->[1] }
map { [ $_, do { no strict 'refs'; ${$_} } ] }
qw(a b c);
- or download this
my $a = 1;
my $b = 2;
...
grep { $_->[1] }
map { [ $_, eval('$'.$_) ] }
qw(a b c);
- or download this
my $combined;
foreach (sort keys %data) {
...
}
chop($combined);