in reply to Re: Has McAfee UpdateLog.txt been updated recently
in thread Has McAfee UpdateLog.txt been updated recently
"Put all your use statements at the top of the file - they are global anyway"
I deleted the use file::find as I am not usig it in the script it was left over from a previous attempt at somehting I did nto quite understand. :)
"Eschew global variable - declare fname, $name ... where they are first used"
When I do this I get an error "Use of uninitialized value in -M at G:\RemoteRegChecks\McAfee Update Check\Nonam
e1NT.pl line 45, <NODELIST> line 14.
Use of uninitialized value in numeric ge (>=) at G:\RemoteRegChecks\McAfee Updat
e Check\Noname1NT.pl line 49, <NODELIST> line 14.
But when I put the declaration at the top of the script I do not have the problem.
"use consistent indentation that reflects block nesting"
I am working my best at this for teh life of me I can never please anyone on this, need to take some classes LOL
"Pass parameters to subs rather than relying on global variables - it's easier to see where things are used and where they come from."
Would you be able ot elaborate on thsi for me? not quite sure what you mean, in the meantime I will be doing some internet searching for tutorials that mention it. :D
"multiple ! are a sign of a sick mind ;)"
How did you know!!!!????? LOL This is mainly there during my testing phase, it prints that out to the command prompt so I could see that part is working :) I will take it out so I do not look as sick anymore (but that does nto mean I am any less sick in the head :) )
Thank you so far for what you have said, it has me looking at the script more on the formatting side of things to try and get it to look better as well as looking for what is going on with the passing parameters thing (I am wondering if that is what is causing me to get teh errors when I try to declare $fname and $name on first use).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Has McAfee UpdateLog.txt been updated recently
by GrandFather (Saint) on Dec 22, 2006 at 01:29 UTC | |
by calin (Deacon) on Dec 22, 2006 at 11:27 UTC |