[23:15][nick:~/monks]$ cat 1138950-3.pl #!/usr/bin/perl use strict; use warnings; my $x = 3; my $y = 0; for(1..3){ $y = $x; $y++; $x -= $y; } [23:15][nick:~/monks]$ perl -d 1138950-3.pl Loading DB routines from perl5db.pl version 1.49 Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(1138950-3.pl:6): my $x = 3; DB<1> a 11 say $y DB<2> n main::(1138950-3.pl:7): my $y = 0; DB<2> main::(1138950-3.pl:9): for(1..3){ DB<2> main::(1138950-3.pl:10): $y = $x; DB<2> main::(1138950-3.pl:11): $y++; 3 DB<2> main::(1138950-3.pl:12): $x -= $y; 4 DB<2> main::(1138950-3.pl:10): $y = $x; 4 DB<2> main::(1138950-3.pl:11): $y++; -1 DB<2> main::(1138950-3.pl:12): $x -= $y; 0 DB<2> main::(1138950-3.pl:10): $y = $x; 0 DB<2> main::(1138950-3.pl:11): $y++; -1 DB<2> main::(1138950-3.pl:12): $x -= $y; 0 DB<2> 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. DB<2> Use 'q' to quit or 'R' to restart. 'h q' for details.