my $parse_tree = expression(); print Dumper $parse_tree; __END__ # again output reformatted $VAR1 = [ [ '2', '*', '3' ], '+', [ '4' ] ];