William_K_F has asked for the wisdom of the Perl Monks concerning the following question:

I have a GUI with embedded perl, the user can type commands at prompt which are evaled by a perl interpreter, what would the user type to eval the contents of a file as a perl script?

For example, in tcl it is source and in python it is exec, so if it were source in perl the session might look like this:
perl $> source myPerlScript.perl [..output from running perl script..] perl $> next_user_input...
Thanks. -William

Replies are listed 'Best First'.
Re: Exec a perl script from a perl script?
by runrig (Abbot) on Oct 10, 2005 at 23:58 UTC
Re: Exec a perl script from a perl script?
by murugu (Curate) on Oct 11, 2005 at 05:01 UTC

    Hi,

    You can use 'do perlscript' in your program.

    Regards,
    Murugesan Kandasamy.