I tried that. But it does not work with use strict
I get an error :
Can't use string ("File_Handle") as a symbol ref while "strict refs" in use at Log_Preocessing.pl line 28.
use strict;
my $Sample = "C:\\Perl\\Ref.txt";
my $File_Handle = "File_Handle";
open $File_Handle, ">$Sample" or die "Cannot open $Sample.txt for read :$!";
print $File_Handle "hi";
while (<$File_Handle>)
{
}