in reply to Embedding fuction output
You can use the @{[func(@args)]} construct, it's ugly but it works:
print <<EOPAGE yarri, yarri, @{[CONF::botnav()]} yarra... EOPAGE
I have never really dug the why of this idiom, the best explanation I can come up with is: [func(@args)] tells Perl that you want to put the result of the function in an anonymous array, and the @{} bit gets the content of that array in a way that is expanded in double-quoted strings (by using EOPAGE without any quotes it defaults to <<"EOPAGE" which treates the following string as double-quoted, nothing would get expanded if you used <<'EOPAGE').
Now whether this increases clarity or adds to the general confusion... you'll have to decide for yourself!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Embedding fuction output
by Hofmator (Curate) on Jun 11, 2001 at 18:10 UTC | |
|
Re: Re: Embedding fuction output
by bwana147 (Pilgrim) on Jun 11, 2001 at 19:31 UTC |