Synopsis:

action position Perl-statement

Set an action to be done before the line is executed. If line is ., set an action on the line about to be executed. The sequence of steps taken by the debugger is:

1. check for a breakpoint at this line
2. print the line if necessary (tracing)
3. do any actions associated with that line
4. prompt user if at a breakpoint or in single-step
5. evaluate line

For example, this will print out the value of $foo every time line 53 is passed:

Examples:

action 53 print "DB FOUND $foo\n"

See also:

help breakpoints