Php Remove Last Element Of Array In Perl