use Data::Dumper; my $c = 0; my $d = [ $c, $c += 2 ]; print Dumper( $d );