why doesn't this eval print ?

Discussion in 'Perl Misc' started by Mr P, May 19, 2006.

  1. Mr P

    Mr P Guest

    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
    Mr P, May 19, 2006
    #1
    1. Advertising

  2. Mr P

    Guest

    Mr P wrote:

    > 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>
    , May 19, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    880
    Mark Rae
    Dec 21, 2006
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,849
    Smokey Grindel
    Dec 2, 2006
  3. keto
    Replies:
    0
    Views:
    935
  4. David Cournapeau

    print a vs print '%s' % a vs print '%f' a

    David Cournapeau, Dec 30, 2008, in forum: Python
    Replies:
    0
    Views:
    348
    David Cournapeau
    Dec 30, 2008
  5. Alex van der Spek

    eval('07') works, eval('08') fails, why?

    Alex van der Spek, Jan 8, 2009, in forum: Python
    Replies:
    6
    Views:
    1,435
    Bruno Desthuilliers
    Jan 8, 2009
Loading...

Share This Page