use feature qw( say ); use Data::Alias qw( alias ); sub concat { my $lhs = shift; my $rhs = shift; $lhs . $rhs } { my $foo = "weird123"; alias push @_, $foo; $foo =~ s/123//; alias push @_, $foo; alias push @_, &concat; say shift(@_); }