in reply to How to eliminate the empty lines while giving user input from terminal

open(my$FHw, '>','/home/Admin/Desktop/ram.txt') or die '$!';

This problem is fairly trivial in the context of the others that have been pointed out, but if this open operation ever fails, the literal characters  $! are all that will ever be printed because  '$!' is a non-interpolating string. See Quote and Quote-like Operators in perlop.