in reply to Re: Re: Alternative to "use constant" in multiple subroutines
in thread Alternative to "use constant" in multiple subroutines

There's a much better way to do that. Use hashes. That's the canonical way to associate a string (like a column name) with a number (like a column number). :-)

Of course, this isn't a reason not to learn modules. You should do that because it's the next step.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

  • Comment on Re3: Alternative to "use constant" in multiple subroutines

Replies are listed 'Best First'.
Re: Re3: Alternative to "use constant" in multiple subroutines
by reds (Novice) on May 01, 2003 at 21:57 UTC
    Thanks; I don't know why I didn't think of hashes. I probably did, but dismissed them for some dumb reason. I'm going to do it the hash way b/c that Seems Best - but I promise to learn modules, too. *grin*