in reply to Help in putting "$" as part of output

Your code is confusing to me and I am not sure what you are trying to do. However to answer part of the question, consider this:
#!usr/bin/perl use warnings; use strict; #to print something verbatim, just use a single tick quote, ' versus " my $head1='$contrl scftyp=rhf RUNTYP=energy coord=unique MULT=1 icharg ++=0 $end'; print $head1; __END__ Prints: $contrl scftyp=rhf RUNTYP=energy coord=unique MULT=1 icharg+=0 $end