Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: script assistance please

by hippo (Bishop)
on Feb 19, 2015 at 21:47 UTC ( [id://1117274]=note: print w/replies, xml ) Need Help??


in reply to script assistance please

Some guidance, as requested:

  1. use strict
  2. use warnings
  3. indent your code to improve legibility
  4. ... and maybe some whitespace within the lines might help too
  5. comment your code liberally
  6. use the 3-argument form of open
  7. check your return values from open()
  8. use lexical filehandles
  9. don't assign to @_ without good reason
  10. go through the (rest of the) Basic debugging checklist

If you do all that, you'll be in a much better place to determine where you are going wrong.

Replies are listed 'Best First'.
Re^2: script assistance please
by marinersk (Priest) on Feb 19, 2015 at 23:07 UTC

    I'm out of votes for the day, but if I could, I would ++hippo for each of the following items from that checklist which were part of my troubleshooting steps:

    1, 3, 4, 7, 10

    I would further point out that things I had either intended to do, or would have done with my own work, include:

    1, 2, 3, 4, 5, 6, 7, 9, 10

    The only item missing is #8, and I don't use those merely out of habit -- but I do ensure every handle is unique globally, which is a less foolproof system, but due to my own rigorous adherence to my own standards, has never failed me in a few decades of using Perl. :-)

      "..I don't use those merely out of habit...ensure every handle is unique globally...due to my own rigorous adherence...never failed me in a few decades..."

      The day will come...even after decades of luck. This applies also to the misuse of @_.

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

        I agree. The stance is academically indefensible.

        It is, nonetheless, an honest appraisal.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 01:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found