#!/usr/bin/perl -w use strict; use warnings; my $matchfile = "match_super.dat"; my $ctfile = "M23263_rna_300-1.dat_1.ct"; my @match;my %data;my $fragment; my $pos; open (A, "<", $matchfile) or die "Check the file $!\n"; while (my $line = ) { chomp $line; (undef, $fragment, undef, $pos) = split(/\t/, $line); $data{$pos} = $fragment; } close (A); my ($num1, $base, $num2, $num3, $connect, $num4); open (B, "<", $ctfile) or die "Check the file $!\n"; while (my $ctline = ) { chomp $ctline; if ($ctline =~ /^(\d+\s+dG.*)/) { # print "$1\n"; next; next; } $pos = (split /\s+/)[0]; print "$data{$pos} $pos\n" if $data{$pos}; } close (B); #### Error: Use of uninitialized value $pos in hash element at ./second_str_map.pl line 29, line 298. Use of uninitialized value $_ in split at ./second_str_map.pl line 28, line 299. Use of uninitialized value $pos in hash element at ./second_str_map.pl line 29, line 299. Use of uninitialized value $_ in split at ./second_str_map.pl line 28, line 300. Use of uninitialized value $pos in hash element at ./second_str_map.pl line 29, line 300. Use of uninitialized value $_ in split at ./second_str_map.pl line 28, line 301. Use of uninitialized value $pos in hash element at ./second_str_map.pl line 29, line 301.