in reply to subtraction in array

What's the difference between <IN> and <$file_handle>? Did you copy and paste that directly from your code or are there typos?

If you're reading one line at a time, and every other line in your file is blank, it only makes sense that your second read will get you no numbers...

You could add more prints to your code, throw in some temporary variables so you can print what you've read from the file before you try to split it. I'd suggest a print inside your pairwise block as well; based on a quick look at pairwise's examples, it does not take two lists as parameters, just one.