What is the different between array and hash in perl programming?



What is the different between array and hash in perl programming?..

Answer / Ankush Sharma

In Perl, an array is a collection of scalars indexed by numbers, while a hash (also known as an associative array) is a collection of key-value pairs. Arrays are accessed using integers, while hashes are accessed using strings.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

What happens when you return a reference to a private variable?

1 Answers  


What is perl shift array function?

1 Answers  


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

1 Answers  


What elements of the Perl language could you use to structure your code to allow for maximum re-use and maximum readability?

1 Answers  


How to convert strings into an array in perl?

1 Answers  


What are prefix dereferencer?

1 Answers  


Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)

1 Answers  


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

1 Answers  


How many types of primary data structures in Perl and what do they mean?

1 Answers  


How do find the length of an array?

0 Answers  


Write a program that shows the distinction between child and parent process?

1 Answers  


How can information be put into hashes?

1 Answers  


Categories