# built in
push @array, $first, $second, @all;
# if you want to have something similar you have to
sub my_push (\@@){
my $array_ref = shift;
my @values = @_;
...
}
# so you can call it as
my_push @arr, 'as', 'it was', 'a builtin';
####
perl -MConfig -e "print qq(For Perl $Config{version} the push prototype is: ),prototype 'CORE::push' "
For Perl 5.8.8 the push prototype is: \@@
perl -e " sub my_push (\@@){$x=shift;push @{$x},@_ }; my_push @arr, qw(a,c,v); print @arr"
a,c,v
# BUT if you inspect manually the prototype of the original push on a recent Perl you'll see
perl -MConfig -e "print qq(For Perl $Config{version} the push prototype is: ),prototype 'CORE::push' "
For Perl 5.14.2 the push prototype is: +@
##
##
my_grep (&@){
my $sub_ref = shift;
@to_be_filterd = @_;
...
}