On Thu, 31 Dec 2009 12:59:03 -0600, Peng Yu wrote: > I want run whatever perl command in an interactive environment. If I can > not use 'my', this is not what I am looking for. > > Of the tools that you recommended, which one can be used to run any > arbitrary perl command?
You have changed your requirement for what you are trying to do. You originally stated: > For example, I have a perl file that first load a huge data file then > do some processing on the data file. The loading time is much longer > than the processing time. If I can not run the perl file > interactively, I will have to load the data file each time I run the > processing code. However, I can interatively run perl code, I can load > the data file once and run the processing code multiple times in order > to debug the processing code. For debugging an existing program as you described there, the perl debugger is one of the best choices, and you do not need to declare new lexical variables from the debugger to do so. Your latest assertion sounds like you want to do something completely different, namely to enter and run Perl code in a read-evaluate-print loop. In which case, see this article: http://chainsawblues.vox.com/library/post/a-perl-read-excute-print-loop- repl.html -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/