in reply to How do I retrieve the value of $HOME?

Instead of $HOME, you want $ENV{HOME}.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^2: How do I retrieve the value of $HOME?
by friedo (Prior) on Dec 30, 2004 at 16:51 UTC
    You should also be checking your opens and using strict.

    #! perl -w use strict; open(MYOUTFILE, ">$ENV{HOME}/tmp/design_name_dnp_top") or die "Could not open design_name_dnp_top for writing: $!"; open (FILEH, "$ENV{HOME}/tmp/strfile") or die "Could not open strfile: $!"; while (<FILEH>) { chomp; /\/([^\/]+)\d$/; print MYOUTFILE $1."topdnp\n"; } close(FILEH); close(MYOUTFILE);