In the code lines below, I need to change
"/tmp" to "~/tmp" or to a home directory "$HOME"
but either options do not work. I added "\$HOME", but
I get an error message about a closedfile on line 4
.
This is for HP-UX UNIX shell.
Thanks... RCP
#! perl -w open(MYOUTFILE, ">/tmp/design_name_dnp_top"); open (FILEH, "/tmp/strfile"); while (<FILEH>) { chomp; /\/([^\/]+)\d$/; print MYOUTFILE $1."topdnp\n"; } close(FILEH); close(MYOUTFILE);
Retitled by davido.
In reply to How do I retrieve the value of $HOME? by RCP
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |