Are the files small? If so, I'd try loading them into memory before your loop through File1 - especially if you're going to do repeated searches:
Then you can use the grep internal function to look for what you want.my @file21 = `ssh host2-1 "cat File2-1"`; my @file22 = `ssh host2-2 "cat File2-2"`;
(This is one of the few times I would use the backticks for running programs...)
In reply to Re: Searching in remote files over SSH
by Tanktalus
in thread Searching in remote files over SSH
by sitnalta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |