do you know a right way of doing this :
I have file one with this info
22-28
36
44-49
234
77
26
and file two :
23
11
21
44
233
26
I need to see if any number or numbers in file one matches a number in file two or if there is number in file two that is in the range of a number in file one . If there is , then print it ...
for example ,, in my files I would print 26 since it appears in both file and 23 since it is in the range of 22-28
I am doing somthing like this but don't seem to get the ones in the range.
for (@fileTow)
{
for (@fileOne)
{
if ($_ =~ /(\d+)-(\d+)/) { my ($start, $end) = split(/-/, $_)};
if (($fileTowValue== $_ ) or ( $fileTowValue>= $start) and ( $fileTowV
+alue<= $end)) {print"$fileTowValue\n"};
}
}
thanks for any help or adivce on doing this ..