Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Search and Replace Text File

by earthboundmisfit (Chaplain)
on Oct 21, 2002 at 19:43 UTC ( #206911=note: print w/replies, xml ) Need Help??

in reply to Search and Replace Text File

Just a quick glance at this suggests some Cargo Cultish practices, but the most glaring problem is that this script won't pass the strict pragma use strict; because you have the correct variable declarations commented out. Aside from that, try inserting the standard error var in your die statements. The way you have it, all data files must reside in the same directory the script is running. If that's indeed the case and it still won't work after making it strict compliant, try looking at your error logs to see what might be the problem.

Replies are listed 'Best First'.
Re: Re: Search and Replace Text File
by Anonymous Monk on Oct 21, 2002 at 20:01 UTC
    I know about STRICT not working; I just need the logic to work first than I will be ok.
      Using strict (and warnings) aren't things you do once your logic works to make your code appear clean; they help get your logic working in the first place. strict restricts unsafe constructs in your code, and warnings produces information useful in debugging your program.

      Before I used both in all of my scripts, I ran into a lot of problems I couldn't solve, but which seemed like logic problems. Adding strict and warnings and then debugging the messages they returned fixed almost all of the problems, which most of the time turned out not to be logic problems at all.

      Love justice; desire mercy.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2018-10-19 13:18 GMT
Find Nodes?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...

    Results (107 votes). Check out past polls.