Describe two ways to concatenate strings in Perl. Contrast and compare.
Perl IT Interview Questions
Describe what the following Perl code does:
#!/usr/bin/perl
$numArgs = $#ARGV + 1;
print "$numArgs\n";
foreach $argnum (0 .. $#ARGV) {
print "$ARGV[$argnum]\n";
}
Write code to print the contents of the following array in Perl:
@fruit = ('banana', 'orange', 'apple');
In Perl, how would you allow functions to have private variables that retain their values from call to call?
What is a good way to fetch the contents of a web page in Perl, given a URL?
What is a common way of sending email from a Perl program?
Design a system to efficiently calculate the top 1MM Google search queries and create a report of these. Additionally:
- You are given twelve servers
- Each has two processors, 4GB of ram and four 400GB hard drives.
- The machines are networked
- The log data as roughly 100 Billion log lines in it.
- The log data comes in twelve, 320 Gb files.
- Each line of the files has roughly 40 search queries
- You can only use open source software or software that you write.