why doesn't this eval print ?

M

Mr P

eval 'print "hello world"';

main::(x.pl:4): eval 'print "hello world"';
DB<1> n
main::((eval 8)[x.pl:4]:1): print "hello world"
DB<1>


*DOH!* Where IS it!?

-Homer
 
N

niall.macpherson

Mr said:
eval 'print "hello world"';

main::(x.pl:4): eval 'print "hello world"';
DB<1> n
main::((eval 8)[x.pl:4]:1): print "hello world"
DB<1>


*DOH!* Where IS it!?

-Homer

Did you hit 'n' again to execute the last line of code ? It works as
expected for me using Active state 5.8.7

C:\develop\NiallPerlScripts>perl -d eval1.pl

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `perldoc perldebug' for more help.

main::(eval1.pl:1): eval 'print "hello world"';
SetConsoleMode failed, LastError=|6| at
C:/Perl/site/lib/Term/ReadKey.pm line 26
5.
at C:/Perl/site/lib/Term/ReadLine/readline.pm line 1415
readline::readline(' DB<1> ') called at
C:/Perl/site/lib/Term/ReadLine/
Perl.pm line 12

Term::ReadLine::perl::readline('Term::ReadLine::perl=ARRAY(0x18d537c)',
' DB<1> ') called at C:/Perl/lib/perl5db.pl line 6367
DB::readline(' DB<1> ') called at C:/Perl/lib/perl5db.pl line
2203
DB::DB called at eval1.pl line 1
DB<1> n
main::((eval 10)[eval1.pl:1]:1): print "hello world"
DB<1> n
hello worldDebugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.
DB<1>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top