#!/usr/bin/perl use 5.016; use Data::Dumper; #1033562 (and id num_qqq.txt, idnum_exp.txt) =head file 1033562_exp.txt exp.txt 0 foo 3 bar 1 table 3 quux 3 fail 2 file 1033562_qqq.txt qqq.txt 0 fail 2 nope 1 foo 3 insert 1 bar 1 quux 3 table 3 tambourine 2 fred 14 =cut open(INDB, "1033562_exp.txt") or die "Can't open exp file, $!"; open(QQQ, "1033562_qqq.txt") or die "Can't open data file, $!"; my (@search, @therecs); while() { my $search = $_; chomp($search); say "\$search at Ln28: $search"; push @search, $search; seek(INDB, 0, 0); } print "\n\n"; while() { my ($ma,$id); my $therec = $_; say "Both elements of \$therec at Ln36: $therec"; chomp($therec); ($ma,$id ) = split(/\t/, $therec); push @therecs, (" $ma " . "| $id |"); my $Qpos=tell QQQ; say "\n\t POS in QQQ: $Qpos \n"; } say "\n \t array search next:"; say Dumper @search; say "\n \t Array @therecs next:"; say Dumper @therecs;