Why are your opening an output file as an input (the leading
< on the file name)? You should be testing every open, and I suspect this is failing on
open because your output file does not exist yet. Please swap your lines 11-13 to:
open FIRST, $first_file or die "Open failed: $!";
open SECOND, $second_file or die "Open failed: $!";
open DATA_1, "</home/Alan/Desktop/sequence_data/sequence_comparison/Ja
+ys_unique.txt" or die "Open failed: $!";
to see why the handle isn't open, and then swap the intent on your DATA_1 handle to get the proper behavior:
open DATA_1, '>', "/home/Alan/Desktop/sequence_data/sequence_comparison/Jays_unique.txt" or die "Open failed: $!";
Please read perlopentut to get some good ideas on how to properly approach this sort of operation.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.