What do the pop & push operators do in perl?
-
They both work on perl arrays. Other scripting/programming languages have this functionality as well.
pop
The pop operator is to do with the right side of an array, it takes off the element or list in an arrary.
push
The push operator is also to do with the right side of an array, it add an element or list to the right side of an array.
perldoc pop: https://perldoc.perl.org/functions/pop.html
peldoc push: https://perldoc.perl.org/functions/push.html
© Lightnetics 2024