Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want write dynamic perl code inside my perl program.
Example :
1) Assign perl block to string
2) I want Assign values of $x and $y$szBlock = q( sub { if ( $x > $y ) { return "X greater \n" ; } else { return "y greater \n" ; } } ) ;
3) Then i want execute $szBlock in side perl program.$x=100 ; $y= 200 ;
In my app depends on paramter i want execute dynamic perl block in my program.
email : gback@drugstore.com
Edit, BazB: added formatting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: dynamic perl code inside my perl program
by davido (Cardinal) on Oct 20, 2003 at 18:38 UTC | |
|
Re: dynamic perl code inside my perl program
by Limbic~Region (Chancellor) on Oct 20, 2003 at 18:53 UTC | |
|
Re: dynamic perl code inside my perl program
by flounder99 (Friar) on Oct 20, 2003 at 19:49 UTC |