in reply to eval, Read environment variable and expand using eval
it didn;t workPlease elaborate. It seems to work for me when I run your 2nd code example. Here is the output I get:
What do you expect the output to be? First, you print the statement verbatim, then you print the eval'd statement. I do not have the HOST variable set.$r = (defined $ENV{HOST} ? $ENV{HOST} : 'sqlhost') sqlhost
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: eval, Read environment variable and expand using eval
by tart (Beadle) on Feb 19, 2010 at 04:34 UTC | |
by ikegami (Patriarch) on Feb 19, 2010 at 07:03 UTC | |
by cdarke (Prior) on Feb 19, 2010 at 09:27 UTC | |
by bot403 (Beadle) on Feb 19, 2010 at 14:58 UTC | |
by Anonymous Monk on Feb 19, 2010 at 15:04 UTC | |
by bot403 (Beadle) on Feb 19, 2010 at 17:08 UTC | |
by ikegami (Patriarch) on Feb 19, 2010 at 21:29 UTC | |
by Anonymous Monk on Feb 19, 2010 at 17:36 UTC |