use strict; use warnings; my $h; { my %h; # watch from here ... $h{fname} = "Foo"; $holder = \%h; } $holder->{lname} = 'Bar'; $holder->{email} = 'foo@bar.com'; # ... to before here #### push @DB::typeahead, (split /\n/, <## 01:26 PM $ perl5.8.5 -d z.pl Loading DB routines from perl5db.pl version 1.27 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(z.pl:4): my $h; main::(z.pl:5): { auto(-12) DB<1> use Devel::Carnivore auto(-11) DB<2> # Line to start watching on auto(-10) DB<3> c 7 main::(z.pl:7): $h{fname} = "Foo"; auto(-9) DB<4> watch(\%h) # variable is now under observation auto(-8) DB<5> # run to point where we want to switch off auto(-7) DB<6> c 13 > "fname" changed from "" to "Foo" at z.pl line 7 > "lname" changed from "" to "Bar" at z.pl line 11 main::(z.pl:13): $h->{email} = 'foo@bar.com'; # ... to before here auto(-6) DB<7> # do so auto(-5) DB<8> unwatch $h # mission completed auto(-4) DB<9> # run to end of program auto(-3) DB<10> c Debugged 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. auto(-2) DB<10> # quit debugger auto(-1) DB<11> q 01:26 PM $