When I run a Perl script, how can I debug it? For example, in ksh I add the -x flag. But how I do the same in Perl?
-x
perl -d your_script.pl args
is how you debug Perl. It launches you into an interactive gdb-style command line debugger.
gdb