1.

What are the various Perl array functions?

Answer»

Perl array CONTAINS a set of specific functions associated with the Perl array. These functions help in adding or removing elements to or from an array. There are four different types of Perl array functions. These are: 

  • Push: Pushes ONE element in the array 
  • Pop: Pulls out one element from the array 
  • Shift: Returns the first value in an array, removing it and SHIFTING the elements of the array LIST to the left by one. 
  • UNSHIFT: Places the given list of elements at the beginning of an array by shifting all the values in the array by right. 


Discussion

No Comment Found