Alternative content
#!/usr/bin/perl -w
use strict;
use warnings;
open(my $ids, "<", "$ARGV[0]") or die "Can't open input.txt: $!";
while (<$ids>) {
chomp;
next if $_ =~ /^\s*$/;
my $id = $_;
open(my $val, "<", "$ARGV[1]") or die "Can't open input.txt: $!";
while (<$val>) {
chomp;
if (/$id/) {
print "found string $id\n";
system ("cp $_ 2move");
}
}
}