in reply to How to interpolate CONSTANTS in Here docs?
C:\test>type junk94.pl #! perl -slw use strict; use constant { OUT_DIR => 'out', OUT_FIELDSEP => '=', OUT_FILENAME => 'ks', OUT_SUFXSTOR => 'storable', VAL_MIN => 15, VAL_MAX => 3600, }; print <<USAGE; This program does this and that with the @{[OUT_DIR]}. The filename is @{[OUT_FILENAME]} and the file suffix is @{[OUT_SUFXSTOR]}. Fields are separated with the @{[OUT_FIELDSEP]} character. Enter a val +ue between @{[VAL_MIN]} and @{[VAL_MAX]}. USAGE C:\test>junk94 This program does this and that with the out. The filename is ks and the file suffix is storable. Fields are separated with the = character. Enter a value between 15 and 3600.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to interpolate CONSTANTS in Here docs?
by CoVAX (Beadle) on Feb 11, 2015 at 22:32 UTC | |
by BrowserUk (Patriarch) on Feb 11, 2015 at 23:16 UTC | |
by Anonymous Monk on Feb 11, 2015 at 22:49 UTC | |
by shmem (Chancellor) on Feb 14, 2015 at 22:09 UTC | |
by ikegami (Patriarch) on Feb 16, 2015 at 02:15 UTC |