Perl Push To Array Python Methods Vs Functions