Why does "x time()" have such a different value than "x $time"?
Because 25 seconds went by between the assignment to $time and the second call to time()?
I have no problem overridding time().
$ cat time.pl use strict; use warnings; BEGIN { no warnings qw(redefine); *CORE::GLOBAL::time = sub { 4 }; } my $time = time(); 1; $ perl -d time.pl Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(time.pl:10): my $time = time(); DB<1> n main::(time.pl:12): 1; DB<1> x $time 0 4 DB<2> x time() 0 4 DB<3> q
In reply to Re: Where does time come from? CORE::GLOBAL:time no honored.
by ikegami
in thread Where does time come from? CORE::GLOBAL:time no honored.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |