in reply to appending file name
Change your code to:
More on string concatenation
my $filename = "rahul.abc"; chomp $filename; my @filenam = split ('\.', $filename); my $fi; my $fff=$filenam[0]."_header".".txt"; print "\n:$fff:\n"
More on string concatenation
In Section
Seekers of Perl Wisdom