What are perl array functions?



What are perl array functions?..

Answer / Pankaj Kumari

Perl has a rich set of built-in functions for working with arrays. Some common ones include `@array` to get the entire array, `$array[index]` to access an element by its index, `push(@array, value)` or `splice(@array, index, 0, value)` to add elements to the array, `pop(@array)` to remove and return the last element, `shift(@array)` to remove and return the first element, and `@array = sort @sort_array` to sort an array.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

Explain perl one-liner?

1 Answers  


What does Perl do if you try to exploit the execve(2) race involving setuid scripts?

1 Answers  


What are the advantages of programming in perl?

1 Answers  


Define perl scripting?

1 Answers  


Which web site will help the student to download the Java mini Project ?

3 Answers  


Explain lists and ivalue?

1 Answers  


Differentiate between use and require, my and local, for and foreach and exec and system

1 Answers  


How to read file into hash array ?

1 Answers  


There are two types of eval statements i.e. Eval expr and eval block. Explain them.

1 Answers  


What are some of the key features of objects in perl?

1 Answers  


How do you turn on the perl warnings?

1 Answers  


explain the various functions/directives in perl that allow you to include/import a module. Also, state the differences between them.

1 Answers  


Categories