So this is the one that i tried and it works. Thanks kenosis and others for taking the time.
foreach my $line ( <FILE1> )
print FILE2 $_;
this made the most clarity for me.
I am assuming that the entire file doesnt gets stored in the $_ in this approach, correct me if i am wrong.
and the file is only getting read one line at a time.
This i want to make sure so that it performs well when i actually test with the huge file.