summaryrefslogtreecommitdiff
path: root/pod/perlembed.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/perlembed.pod')
-rw-r--r--pod/perlembed.pod7
1 files changed, 2 insertions, 5 deletions
diff --git a/pod/perlembed.pod b/pod/perlembed.pod
index 378a7d6435..e1ab91eaba 100644
--- a/pod/perlembed.pod
+++ b/pod/perlembed.pod
@@ -578,15 +578,12 @@ deep breath...
int main (int argc, char **argv, char **env)
{
- char *my_argv[2];
+ char *my_argv[] = { "", "power.pl" };
my_perl = perl_alloc();
perl_construct( my_perl );
- my_argv[1] = (char *) malloc(10);
- sprintf(my_argv[1], "power.pl");
-
- perl_parse(my_perl, NULL, argc, my_argv, NULL);
+ perl_parse(my_perl, NULL, 2, my_argv, (char **)NULL);
perl_run(my_perl);
PerlPower(3, 4); /*** Compute 3 ** 4 ***/