In FAQ4
http://theoryx5.uwinnipeg.ca/CPAN/perl/pod/perlfaq4/How_do_I_expand_fu
+nction_calls_i.html
I found an issue on expanding function calls from strings.
These makes me weep for my late Sinclair Spectrum's Basic.
It used to have a Function calles EVAL$ that could directly evaluate Functions entered by the user into a String.
The article above is on expanding an functions
existing somewhere in the current Perl file by using ${/ ...}.
Things like (Think of replacing "cos($i)" by <STDIN>..)
#!/usr/bin/perl
use posix;#
$i=3;
$funk = "cos($i)";
print "Das ist ${\$funk}";
actually do'nt work properly.
Of cause I could generate an external Module on the
fly and then reference to it. But it wold be a much
deeper meditation on the special strength of interpreter
languages to do it all inline.
**Ommmmm**
Edit: 2001-03-03 by neshura
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.