in reply to Interpolating in Here Documents?
This could be adapted to use your message wrapper function, but I beg you: Please do not use the ampersand! That was killed off when Perl 4 was replaced.my %help = ( find => <<END, Help for command 'find': Don't forget to set the variable \$foo to the default value of '$foo_default', or space rays will erase data on your computer. END add => <<END, Help for command 'add': If you use this command, your bank balance will increase by the specified amount. Advance two spaces and skip a turn. END ); my %alias = ( plus => 'add', '?' => 'find', ); print $help{$alias{$ARGV[0]} || $ARGV[0]};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Interpolating in Here Documents?
by Abigail-II (Bishop) on Jul 24, 2002 at 11:45 UTC | |
by tadman (Prior) on Jul 24, 2002 at 12:24 UTC | |
by frankus (Priest) on Jul 24, 2002 at 13:10 UTC |