I have 5 files in different directory. I am extracting the data's from all files and make it as new file.
Note: input each file as an array and extract the data by using for loop for each n every files. I want to make it as single for loop to take the files and process the rest
For file1 am using
foreach (@file)
{
my @temp = split(/\t/, trim($_));
push(@output, $temp[0] . "\t" . $temp[1] . "\n");
}
foreach(uniq(@output))
{
print $OUTPUTFILE $_;
}
I am doing this for five times to process five file. Can anyone help me on how to make it simple