$ 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