I have been using this script of mine FOREVER and I have always been using \"~/\" to expand my home directory. I get into work today and it stopped working:
#if
~ is expanded by the shell. Perl has no idea about it. So, it would work only within a shell script.
~