#!/usr/local/bin/perl CHECK { require B::Generate; use B::Utils qw(opgrep walkallops_filtered); walkallops_filtered ( sub { opgrep( { name => 'push', first => { sibling => { name => [ 'padsv', 'gvsv' ] } } }, $_[0] ) }, sub { my $kid0 = $_[0]->first; my $ref = $kid0->sibling; my $val = $ref->sibling; my $rv2av = B::UNOP->new( 'rv2av', 0, $ref ); $kid0->sibling( $rv2av ); $rv2av->sibling( $val ); $ref->sibling( undef ); $rv2av->first( $ref ); $kid0->next( $ref ); $ref->next( $rv2av ); $rv2av->next( $val ); } ); } my @a = 1; my $a = \@a; push @{$a}, 2; push $a, 4; # alter this to do @$a print join(', ',@a) . "\n";