#!/usr/bin/perl open my $fh, "<file1" or die $!; chomp ( my @num = <$fh> ); open my $fh2, "<file2" or die $!; while ( defined ( $_ = <$fh2> ) ) { chomp; my ( $name, $num ) = split /\t/; for ( @num ) { print "$name\n" if $_ - .5 <= $num && $_ + .5 >= $num; } }
In reply to Re: simple search and print
by borisz
in thread simple search and print
by dr_jgbn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |