in reply to Re: Perplexing perl problem
in thread Perplexing perl problem

DB<1> print (2+2)*5; 4 DB<2> print ((2+2)*5); 20 DB<3> print 3*5; 15 DB<4> $foo=(2+2)*5; DB<5> x $foo 0 20

Well, I guess it's some side effect to do with print.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^3: Perplexing perl problem
by BrowserUk (Patriarch) on Jun 24, 2005 at 15:08 UTC

    Shame the debugger doesn't honour -w

    P:\test>perl -wde1 perldb: Must not source insecure rcfile ./perldb.ini. You or the superuser must be the owner, and it must not be writable by anyone but its owner. Loading DB routines from perl5db.pl version 1.25 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(-e:1): 1 DB<1> print (2+2)*5;; 4 DB<2> q P:\test>perl -wle"print (2+2)*5" print (...) interpreted as function at -e line 1. Useless use of multiplication (*) in void context at -e line 1. 4

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.