Perl Developer Interview Questions

103 perl developer interview questions shared by candidates

You have datastructure my $users = [ { name => 'John', score => 10, }, { name => 'Bob', score => 1, }, { name => 'Carlos', score => 5 }, { name => 'Alice', score => 5, }, { name => 'Donald', score => 7 } ]; now u have to arrange the name with highest to lower score, if score is same than in alphabetical order #expected output: # John # Donald # Alice # Carlos # Bob
avatar

Perl Developer

Interviewed at Booking.com

4.1
Mar 24, 2014

You have datastructure my $users = [ { name => 'John', score => 10, }, { name => 'Bob', score => 1, }, { name => 'Carlos', score => 5 }, { name => 'Alice', score => 5, }, { name => 'Donald', score => 7 } ]; now u have to arrange the name with highest to lower score, if score is same than in alphabetical order #expected output: # John # Donald # Alice # Carlos # Bob

one question was as under - "Symmetric Difference of Arrays" Input: two arrays of integers Output: one array of integers which occur in only one (not both) arrays Test case: Input: [ 1, 7, 8, 2, 4, 5 ] [ 3, 5, 1, 7, 6, 9 ] Output: [ 8, 2, 4, 3, 6, 9 ]
Apr 15, 2014

one question was as under - "Symmetric Difference of Arrays" Input: two arrays of integers Output: one array of integers which occur in only one (not both) arrays Test case: Input: [ 1, 7, 8, 2, 4, 5 ] [ 3, 5, 1, 7, 6, 9 ] Output: [ 8, 2, 4, 3, 6, 9 ]

You have the file with word at a single line. #input sample file abactor abaculus abacus Abadite . . Zyrenian #Output ******************a **********b ************************c a) you have to count the character and create a histogram in alphabetical order. b) now you have to produce a histogram with max 80 character in line in reference to max count c) now same out based histrogram based on the character count
avatar

Perl Developer

Interviewed at Booking.com

4.1
Mar 24, 2014

You have the file with word at a single line. #input sample file abactor abaculus abacus Abadite . . Zyrenian #Output ******************a **********b ************************c a) you have to count the character and create a histogram in alphabetical order. b) now you have to produce a histogram with max 80 character in line in reference to max count c) now same out based histrogram based on the character count

Write a function get_hops_from(page1, page2) that will determine the number of hyperlinks that you would need to click on to get from some page1 on the web to some other page2 on the web. For example, if each page below links to the pages that are indented below it, e.g. page 1 links to pages 2 and 5, and page 2 links to pages 3 and 4, and page 5 links to pages 3 and 7, then the get_hops_from(page1, page7) should return 2 (2 hops), since you have to hop once from page 1 to 5 and once more from page 5 to page 7. page1 : distance == 0 page2 : distance == 1 page3 : distance == 2 page4 : distance == 2 page5 : distance == 2 page3 : distance == 2 page7 : distance == 2 Assume that an API is available to: * get_links(a_page) will return an array/list of all pages that a_page links to
avatar

Software Developer - (Willing to Learn Perl)

Interviewed at Booking.com

4.1
Aug 25, 2014

Write a function get_hops_from(page1, page2) that will determine the number of hyperlinks that you would need to click on to get from some page1 on the web to some other page2 on the web. For example, if each page below links to the pages that are indented below it, e.g. page 1 links to pages 2 and 5, and page 2 links to pages 3 and 4, and page 5 links to pages 3 and 7, then the get_hops_from(page1, page7) should return 2 (2 hops), since you have to hop once from page 1 to 5 and once more from page 5 to page 7. page1 : distance == 0 page2 : distance == 1 page3 : distance == 2 page4 : distance == 2 page5 : distance == 2 page3 : distance == 2 page7 : distance == 2 Assume that an API is available to: * get_links(a_page) will return an array/list of all pages that a_page links to

Convert number above in hexadecimal 312312 Ex. 255 -> FF 254 -> 254 div 16 = 14, int(254/16) = 15. -> F, E Later I found the detailed Division-remainder in source base http://en.wikipedia.org/wiki/Hexadecimal#Division-remainder_in_source_base
avatar

Perl Developer

Interviewed at Booking.com

4.1
Feb 6, 2015

Convert number above in hexadecimal 312312 Ex. 255 -> FF 254 -> 254 div 16 = 14, int(254/16) = 15. -> F, E Later I found the detailed Division-remainder in source base http://en.wikipedia.org/wiki/Hexadecimal#Division-remainder_in_source_base

Viewing 1 - 10 interview questions

Glassdoor has 103 interview questions and reports from Perl developer interviews. Prepare for your interview. Get hired. Love your job.