Create a Perl script


id name address

1 cristine New York

2 murray Redmond

3 kumar Sunnyvale

This is 'sample.xlsx' file. (Can't attach the image.)
'id' string in A1, 'name' in B1, 'address' in C1 column in excel file.

Create a Perl script to store the information about employee using the header as in raw 1. The Perl script should be able to provide data of any employee using the id

or name or address. For example: If I need details that who is the person lives in Sunnyvale, the Perl script should give me back the result as Kumar.

*What data structure you have used and why?
*Try out usage of GetOptions in Perl script...?
*How can I manage duplicate data if any?

Questions by Cristine Thine

Showing Answers 1 - 1 of 1 Answers


  • Aug 10th, 2011

Keep the student id as key to a hash and the rest of the elements are the array reference.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions