[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [LONG, off-topic]] Interactive Programming (fwd)





Brandon Crosby <[email protected]> writes:
> PERL is a pretty high-level language... how do you add sub's after
> running the code?

You eval them.  Perl has a construct eval( "string" ) where string can
be arbitary perl code which is evaluated into the current context.
That can include function definitions even I think.

Adam
-- 
Now officially an EAR violation...
Have *you* exported RSA today? --> http://www.dcs.ex.ac.uk/~aba/rsa/

print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<>
)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`