Perl execution commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl execution commands
# 1  
Old 12-15-2014
Perl execution commands

I don't know to debug the program todaylive.pl program.

plz someone let me know what are the commands I need to know to debug the perl programs to find out the error on it.
# 2  
Old 12-15-2014
Hello ramkumar15,

To debug a perl program, invoke the perl debugger using perl -d as follows.
Code:
perl -d  ./sample.pl

Thanks,
R. Singh
# 3  
Old 12-15-2014
how to proceed with the next line statement and also how to view the variable on it.
# 4  
Old 12-15-2014
For help, type h cmd_letter, or run man perldebug for all docs.

Code:
  DB<1> h
List/search source lines:               Control script execution:
  l [ln|sub]  List source code            T           Stack trace
  - or .      List previous/current line  s [expr]    Single step [in expr]
  v [line]    View around line            n [expr]    Next, steps over subs
  f filename  View source in file         <CR/Enter>  Repeat last n or s
  /pattern/ ?patt?   Search forw/backw    r           Return from subroutine
  M           Show module versions        c [ln|sub]  Continue until position
Debugger controls:                        L           List break/watch/actions
  o [...]     Set debugger options        t [expr]    Toggle trace [trace expr]
  <[<]|{[{]|>[>] [cmd] Do pre/post-prompt b [ln|event|sub] [cnd] Set breakpoint
  ! [N|pat]   Redo a previous command     B ln|*      Delete a/all breakpoints
  H [-num]    Display last num commands   a [ln] cmd  Do cmd before line
  = [a val]   Define/list an alias        A ln|*      Delete a/all actions
  h [db_cmd]  Get help on command         w expr      Add a watch expression
  h h         Complete help page          W expr|*    Delete a/all watch exprs
  |[|]db_cmd  Send output to pager        ![!] syscmd Run cmd in a subprocess
  q or ^D     Quit                        R           Attempt a restart
Data Examination:     expr     Execute perl code, also see: s,n,t expr
  x|m expr       Evals expr in list context, dumps the result or lists methods.
  p expr         Print expression (uses script's current package).
  S [[!]pat]     List subroutine names [not] matching pattern
  V [Pk [Vars]]  List Variables in Package.  Vars can be ~pattern or !pattern.
  X [Vars]       Same as "V current_package [Vars]".  i class inheritance tree.
  y [n [Vars]]   List lexicals in higher scope <n>.  Vars same as V.
  e     Display thread id     E Display all thread ids.
For more help, type h cmd_letter, or run man perldebug for all docs.
  DB<1>

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Execution of local commands for remote site.

Hi all, I have a problem with ftp execution within unix environment. I'd like to get files on remote and delete them later, but here is too crowd so I can accidentally delete some files. Can I delete only the files I can get to the local folder? I can ask this question with a different... (14 Replies)
Discussion started by: attillam
14 Replies

2. Shell Programming and Scripting

Execution of Shell Commands

I have a question: Where would I put the Command line (of any command) so that it executes every time I log on? Where would I put it if I want it to execute every time I start a new shell? (5 Replies)
Discussion started by: Nabeel Nazir
5 Replies

3. Shell Programming and Scripting

Sequential execution of commands in ksh

I need to run few commands in a ksh script sequentially. Some of the commands are jobs submitted to the server and the consecutive commands are dependent on the completion of the jobs submitted to the server. It works if i separate the commands into different files like this #!/bin/ksh... (1 Reply)
Discussion started by: prashob123
1 Replies

4. Shell Programming and Scripting

Execution problem unix commands in Perl CGI

I am trying to run SSH , mkdir and other unix commands using Perl CGI. But i am not able to Execute these commands. Please help me out !!!! SSH and mkdir is necessity for me. I will be thankful to you...!!!!! I am trying like: In perl CGI file i am writing like: @list = `ssh... (28 Replies)
Discussion started by: Navrattan Bansa
28 Replies

5. Shell Programming and Scripting

Automating execution of commands inside a program

I have a program dnapars I execute the program from command line as following: ./dnapars The program then prompts me some message as a user menu from where I have to select a series of options in the order R U Y R. And then I copy the output file (outfile) in another result file. I wrote the... (3 Replies)
Discussion started by: deeptisjains
3 Replies

6. Shell Programming and Scripting

Differences in printed commands after execution with same code

I have a korn shell script that executes a function which is stored in a common library. In the function there is obviously some code. Here is the line of code in the function in question: temp=`echo $status_cnt|tr -d ` When the shell script executes with set -x, I'm seeing that on most... (2 Replies)
Discussion started by: mjf
2 Replies

7. UNIX for Dummies Questions & Answers

Trigger execution of commands whenever number of file descriptors changes

Hi, I am a Unix Newbie :D. I want to write a program such a way that: Whenever number of filedescriptors opened by a process change, it should execute some commands (eg: write total number of FDs at that point of time to a file). I dont want to poll '/proc/<pid>/fd' at regular intervals... (3 Replies)
Discussion started by: poweruser
3 Replies

8. UNIX for Advanced & Expert Users

multiple commands execution

Hi i have 3 sql scripts that need to be executed simultaneously, and independent of one another, how do i do that in Unix AIX 5.3 (1 Reply)
Discussion started by: yschd
1 Replies

9. Shell Programming and Scripting

Problem while execution of second set of commands

Hi, I have a shell script with code . perf.env cd $QRY_DIR for SHELL_FILE in sql1 do export SNAME=$SHELL_FILE ${SCRIPT_DIR}/perf_qry.sh ${SPOOL_DIR} ${DB_ENVNAME} ${NAME} & RC=$(expr ${RC:-0} + $? ) sleep 60 if then echo sysdate>test1 echo query1.txt>>test1 grep -i... (6 Replies)
Discussion started by: ran16
6 Replies

10. Shell Programming and Scripting

Problem while execution of second set of commands

Hi, I have a shell script with code . perf.env cd $QRY_DIR for SHELL_FILE in sql1 do export SNAME=$SHELL_FILE ${SCRIPT_DIR}/perf_qry.sh ${SPOOL_DIR} ${DB_ENVNAME} ${NAME} & RC=$(expr ${RC:-0} + $? ) sleep 60 if then echo sysdate>test1 echo query1.txt>>test1 grep -i... (0 Replies)
Discussion started by: ran16
0 Replies
Login or Register to Ask a Question