in reply to Re: MoveCeiling - monitor filesystem growth
in thread MoveCeiling - monitor filesystem growth
Hey!
With regard to $#ARGV versus @ARGV... I was working with indexes at that point in the code, and didn't think to switch gears mentally and make the check look more readable. You are correct, it is a little obfuscated to an outside observer, since element 0 is the beginning of the argument list in ARGV versus 1 with 0 being the command itself. Thats what $0 is for, as you probably know. Good catch, btw.
Blocking things off into subroutines right off the bat is sort of a style quirk of mine. For strict procedural things, you're right, it's sort of pointless...But it helps if I have to revisit the code later and make changes, which is a frequent occurence here where I work. It's kind of funny, we have sort of a generic "grandfather" script we use over here as sort of a template for "watch this, do this, and notify this person" tasks...This script wasn't derived from it, specifically, but I can think of at least half a dozen scripts we use that were, and it came in handy to have things already compartmentalized like that. spinDownRoutine() is a good example. Everything I write has a spinUp/Down routine. Sometimes they come in handy, other times they're just withered limbs.
As for the typo, that's an artifact of the cut/paste process to get it posted here on PerlMonks. :)
Cheers,
Bowie