I am new to programming and hence I am stuck on a basic level problem.

Following is code I wrote for comparison. But the result I get does not make sense to me. I would appreciate if someone could tell me what is going wrong. 

There are two arrays: @array1 , @array2 of unequal length. 

I wish to compare both and list down values not present in @array1.

my %temp = map {$_,$_}@array2;
for (@array1){
next if exists $temp{$_};
open (FILE, "&gt;&gt;/filename") or die "$!";
print FILE "$_\n";
close(FILE);
}



Question: What does the lpr -h command exactly mean from linux?
Answer: man lpr --> -h --> -o job-sheets=none --> banner page --> Wikipedia &ndash; Banner Page.

The first page explains what the command does, the second explains the options -o takes and the third explains what the banner page actually is; thus we obtain this paragraph from Wikipedia:


  A banner page, also called a burst page, job sheet, or a printer separator, is used in computerized printing in order to separate documents (or "print jobs") from each other and to identify the originator of the print request by username. These pages are typically used in office environments where many people share a small number of printers. In some cases, print jobs are sent to a central processing area where messengers take the printouts back to the owner, but the usual practice in modern office environments is for the user to retrieve his or her own documents. The banner page makes it clear who printed each job.


You can find examples of what banner pages look like on Google Images.

Also, I should note that the Linux banner command is something completely different.

You are responsible for not doing your homework yourself, not me.