Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^6: How to rename the contents in perl?

by finddata (Sexton)
on Mar 20, 2017 at 09:25 UTC ( #1185241=note: print w/replies, xml ) Need Help??


in reply to Re^5: How to rename the contents in perl?
in thread How to rewrite the contents of the file using perl?

I had used print statements to test those statements are not printed.Thats why i finalyzed my program is not working
  • Comment on Re^6: How to rename the contents in perl?

Replies are listed 'Best First'.
Re^7: How to rename the contents in perl?
by Corion (Pope) on Mar 20, 2017 at 09:30 UTC

    If your subroutines do not get entered at all, the problem is not with the subroutines but with the code that calls them.

    Please debug it some more and find out where your program does not do what you think it should.

    Add a print statement at the start of each loop to print out the current value of the loop variable.

    Add a print statement in every if block and also every else block to see what path your code takes. If there is no else block, add it.

    Add a print statement on every line to find out where your program does not enter your subroutine.

    This will help you to find out where your program does not do what you think it should do.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1185241]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2020-01-25 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?