You've been asked several times to make some effort when asking for help, dumping code without a description of what is happening is just lazy.
Global symbol "$file1" requires explicit package name (did you forget +to declare "my $file1"?) at sid.pl line 5. Can't find string terminator "END1" anywhere before EOF at sid.pl line + 5.
See previous notes on use strict; use warnings;.
open(my $f3, ">", "C:/Users/Siddharth/Desktop/two.txt") or die "Can't open < input.txt: $!";
two.txt and input.txt aren't the same file, your report is wrong as you report a reading failure when you're actually trying to write a file. Take the time to read and understand the responses and working examples you've already been given.
In reply to Re^13: partial matching of lines in perl
by marto
in thread partial matching of lines in perl
by Sidd@786
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |